boho 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boho.esm.js.map +1 -1
- package/dist/boho.min.js +2 -2
- package/dist/boho.min.js.map +1 -1
- package/package.json +1 -1
- package/test-browser/index.html +5 -6
- package/test-browser/loader.html +8 -7
package/package.json
CHANGED
package/test-browser/index.html
CHANGED
|
@@ -20,12 +20,11 @@
|
|
|
20
20
|
<script>
|
|
21
21
|
|
|
22
22
|
let assert = chai.assert;
|
|
23
|
-
const RAND =
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const Meta = BOHO.Meta
|
|
23
|
+
const RAND = Boho.RAND
|
|
24
|
+
const MBP = Boho.MBP
|
|
25
|
+
const MetaSize = Boho.MetaSize
|
|
26
|
+
const BohoMsg = Boho.BohoMsg
|
|
27
|
+
const Meta = Boho.Meta
|
|
29
28
|
|
|
30
29
|
describe('RAND browser', function () {
|
|
31
30
|
describe('for number', function () {
|
package/test-browser/loader.html
CHANGED
|
@@ -9,21 +9,22 @@
|
|
|
9
9
|
<body>
|
|
10
10
|
<p>this page include boho module two times. </p>
|
|
11
11
|
<h1>1. IIFE: boho.min.js</h1>
|
|
12
|
-
<p>use global name:
|
|
13
|
-
<p>
|
|
12
|
+
<p>use global name: Boho </p>
|
|
13
|
+
<p>Boho has props: sha256, Buffer, RAND , MBP,, </p>
|
|
14
14
|
<h1>2. ES Module: boho.esm.js</h1>
|
|
15
15
|
<script src="../dist/boho.min.js"></script>
|
|
16
16
|
<script>
|
|
17
|
-
console.log('min.js: sha256.hash("hi")',
|
|
18
|
-
console.log('min.js:
|
|
19
|
-
console.log('min.js: RAND',
|
|
17
|
+
console.log('min.js: sha256.hash("hi")', Boho.sha256.hash('hi'))
|
|
18
|
+
console.log('min.js: Buffer', Boho.Buffer.alloc(33))
|
|
19
|
+
console.log('min.js: RAND', Boho.RAND(33))
|
|
20
20
|
|
|
21
21
|
</script>
|
|
22
22
|
<script type="module">
|
|
23
|
-
import {
|
|
23
|
+
import { sha256, Buffer, RAND,MBP } from "../dist/boho.esm.js"
|
|
24
24
|
console.log('esm: sha256.hash("hi")', sha256.hash('hi'))
|
|
25
|
-
console.log('esm:
|
|
25
|
+
console.log('esm: Buffer', Buffer.alloc(33))
|
|
26
26
|
console.log('esm: RAND', RAND(33))
|
|
27
|
+
console.log('esm: MBP', MBP )
|
|
27
28
|
|
|
28
29
|
console.log('isSecureContext', isSecureContext)
|
|
29
30
|
</script>
|