@thi.ng/binary 3.4.53 → 3.4.55

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-07-10T14:20:23Z
3
+ - **Last updated**: 2025-07-20T14:56:01Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/mask.d.ts CHANGED
@@ -6,12 +6,17 @@ import type { FnU2 } from "@thi.ng/api";
6
6
  * @example
7
7
  * ```ts tangle:../export/mask.ts
8
8
  * import { defMask } from "@thi.ng/binary";
9
+ * import { U32 } from "@thi.ng/hex";
9
10
  *
10
- * console.log(defMask(1,31).toString(16));
11
+ * console.log(
12
+ * U32(defMask(1,31))
13
+ * );
11
14
  * // 7ffffffe
12
15
  *
13
- * console.log(defMask(3,8).toString(16));
14
- * // f8
16
+ * console.log(
17
+ * U32(defMask(3,8))
18
+ * );
19
+ * // 000000f8
15
20
  * ```
16
21
  *
17
22
  * @param a - first bit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/binary",
3
- "version": "3.4.53",
3
+ "version": "3.4.55",
4
4
  "description": "100+ assorted binary / bitwise operations, conversions, utilities, lookup tables",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,10 +39,10 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.11.30"
42
+ "@thi.ng/api": "^8.11.31"
43
43
  },
44
44
  "devDependencies": {
45
- "esbuild": "^0.25.6",
45
+ "esbuild": "^0.25.8",
46
46
  "typedoc": "^0.28.7",
47
47
  "typescript": "^5.8.3"
48
48
  },
@@ -133,5 +133,5 @@
133
133
  "transducers-binary"
134
134
  ]
135
135
  },
136
- "gitHead": "56d8f088389b22192a06e9a395b5eecebf47697a\n"
136
+ "gitHead": "3cd1bea8b2bf6b859609f6d5c14b4eb64745681f\n"
137
137
  }
package/swizzle.d.ts CHANGED
@@ -79,21 +79,22 @@ export declare const setLane2: (x: number, y: number, lane: Lane2) => number;
79
79
  * @example
80
80
  * ```ts tangle:../export/swizzle.ts
81
81
  * import { swizzle8 } from "@thi.ng/binary";
82
+ * import { U32 } from "@thi.ng/hex";
82
83
  *
83
84
  * console.log(
84
- * swizzle8(0x12345678, 3, 2, 1, 0).toString(16)
85
+ * U32(swizzle8(0x12345678, 3, 2, 1, 0))
85
86
  * );
86
- * // 0x78563412
87
+ * // 78563412
87
88
  *
88
89
  * console.log(
89
- * swizzle8(0x12345678, 1, 0, 3, 2).toString(16)
90
+ * U32(swizzle8(0x12345678, 1, 0, 3, 2))
90
91
  * );
91
- * // 0x34127856
92
+ * // 34127856
92
93
  *
93
94
  * console.log(
94
- * swizzle8(0x12345678, 2, 2, 0, 0).toString(16)
95
+ * U32(swizzle8(0x12345678, 2, 2, 0, 0))
95
96
  * );
96
- * // 0x56561212
97
+ * // 56561212
97
98
  * ```
98
99
  *
99
100
  * @param x - value
@@ -123,16 +124,17 @@ export declare const swizzle4: (x: number, a: Lane4, b: Lane4, c: Lane4, d: Lane
123
124
  * @example
124
125
  * ```ts tangle:../export/mux.ts
125
126
  * import { mux } from "@thi.ng/binary";
127
+ * import { U32 } from "@thi.ng/hex";
126
128
  *
127
129
  * console.log(
128
- * mux(0x12345678, 0xaaaa5555, 0xffff0000)
130
+ * U32(mux(0x12345678, 0xaaaa5555, 0xffff0000))
129
131
  * );
130
- * // 0xaaaa5678
132
+ * // aaaa5678
131
133
  *
132
134
  * console.log(
133
- * mux(0x12345678, 0xaaaa5555, 0x0000ffff)
135
+ * U32(mux(0x12345678, 0xaaaa5555, 0x0000ffff))
134
136
  * );
135
- * // 0x12345555
137
+ * // 12345555
136
138
  * ```
137
139
  *
138
140
  * @param a -
@@ -152,11 +154,12 @@ export declare const flip8: FnN;
152
154
  * @example
153
155
  * ```ts tangle:../export/flip16.ts
154
156
  * import { flip16 } from "@thi.ng/binary";
157
+ * import { U32 } from "@thi.ng/hex";
155
158
  *
156
159
  * console.log(
157
- * flip16(0x12345678).toString(16)
160
+ * U32(flip16(0x12345678))
158
161
  * );
159
- * // 0x56781234
162
+ * // 56781234
160
163
  * ```
161
164
  *
162
165
  * @param x -