extra-bit 2.1.3 → 2.1.4
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 +11 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
This package includes [bit twiddling hacks] by Sean Eron Anderson and many others.<br>
|
|
1
|
+
A collection of common bitwise operations.<br>
|
|
3
2
|
📦 [Node.js](https://www.npmjs.com/package/extra-bit),
|
|
4
3
|
🌐 [Web](https://www.npmjs.com/package/extra-bit.web),
|
|
5
4
|
📜 [Files](https://unpkg.com/extra-bit/),
|
|
6
5
|
📰 [Docs](https://nodef.github.io/extra-bit/).
|
|
7
6
|
📘 [Wiki](https://github.com/nodef/extra-bit/wiki/).
|
|
8
7
|
|
|
8
|
+
The [bit] is a basic unit of information in information theory, computing. This
|
|
9
|
+
package includes [bit twiddling hacks] by *Sean Eron Anderson* and many others.
|
|
10
|
+
JavaScript converts a `Number` (a *64-bit floating point number*) to a *32-bit*
|
|
11
|
+
*integer* when bitwise operators (such as `|`) are applied. All bitwise operations
|
|
12
|
+
are performed on **32-bit integers**.
|
|
13
|
+
|
|
9
14
|
This package is available in *Node.js* and *Web* formats. The web format
|
|
10
15
|
is exposed as `extra_bit` standalone variable and can be loaded from
|
|
11
16
|
[jsDelivr CDN].
|
|
12
17
|
|
|
13
18
|
> Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
|
|
14
19
|
|
|
20
|
+
[bit]: https://en.wikipedia.org/wiki/Bit
|
|
21
|
+
[bit twiddling hacks]: https://graphics.stanford.edu/~seander/bithacks.html
|
|
15
22
|
[jsDelivr CDN]: https://cdn.jsdelivr.net/npm/extra-bit.web/index.js
|
|
16
23
|
|
|
17
24
|
<br>
|
|
@@ -65,10 +72,10 @@ bit.signExtend(15, 4);
|
|
|
65
72
|
<br>
|
|
66
73
|
<br>
|
|
67
74
|
|
|
75
|
+
|
|
68
76
|
[](https://www.youtube.com/watch?v=4Yy0pPTrHlk)
|
|
69
77
|
|
|
70
|
-
|
|
71
|
-
[bit twiddling hacks]: https://graphics.stanford.edu/~seander/bithacks.html
|
|
78
|
+
|
|
72
79
|
[get]: https://nodef.github.io/extra-bit/modules.html#get
|
|
73
80
|
[getAs]: https://nodef.github.io/extra-bit/modules.html#getAs
|
|
74
81
|
[set]: https://nodef.github.io/extra-bit/modules.html#set
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extra-bit",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.4",
|
|
4
|
+
"description": "A collection of common bitwise operations.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"module": "index.mjs",
|