extra-bit 2.1.1 → 2.1.2
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/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,22 +19,22 @@ is exposed as `extra_bit` standalone variable and can be loaded from
|
|
|
19
19
|
```javascript
|
|
20
20
|
const bit = require('extra-bit');
|
|
21
21
|
// import * as bit from "extra-bit";
|
|
22
|
-
// import * as bit from "https://unpkg.com/extra-bit
|
|
22
|
+
// import * as bit from "https://unpkg.com/extra-bit/index.mjs"; (deno)
|
|
23
23
|
|
|
24
24
|
bit.count(7);
|
|
25
|
-
// 3 (111 ⇒ 3)
|
|
25
|
+
// → 3 (111 ⇒ 3)
|
|
26
26
|
|
|
27
27
|
bit.parity(8, 2);
|
|
28
|
-
// 2 (10,00 ⇒ 10)
|
|
28
|
+
// → 2 (10,00 ⇒ 10)
|
|
29
29
|
|
|
30
30
|
bit.swap(6, 1, 0);
|
|
31
|
-
// 5 (110 ⇒ 101)
|
|
31
|
+
// → 5 (110 ⇒ 101)
|
|
32
32
|
|
|
33
33
|
bit.reverse(0xFFFF0000);
|
|
34
|
-
// 65535 (0x0000FFFF)
|
|
34
|
+
// → 65535 (0x0000FFFF)
|
|
35
35
|
|
|
36
36
|
bit.signExtend(15, 4);
|
|
37
|
-
// -1
|
|
37
|
+
// → -1
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
<br>
|