@mrpelz/misc-utils 1.0.0 → 1.1.1
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 +184 -1
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +8 -7
- package/dist/data.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,186 @@
|
|
|
1
1
|
# @mrpelz/misc-utils
|
|
2
2
|
|
|
3
|
-
Miscellaneous TypeScript
|
|
3
|
+
Miscellaneous TypeScript helpers.
|
|
4
|
+
|
|
5
|
+
## `data`
|
|
6
|
+
|
|
7
|
+
Miscellaneous data conversion helpers.
|
|
8
|
+
|
|
9
|
+
### `emptyBuffer`
|
|
10
|
+
|
|
11
|
+
Empty/zero-length Buffer.
|
|
12
|
+
|
|
13
|
+
### `falseBuffer`
|
|
14
|
+
|
|
15
|
+
One-byte `0` Buffer.
|
|
16
|
+
|
|
17
|
+
### `trueBuffer`
|
|
18
|
+
|
|
19
|
+
One-byte `1` Buffer.
|
|
20
|
+
|
|
21
|
+
### arrayCompare
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
const arrayCompare = <
|
|
25
|
+
A extends Array<unknown>,
|
|
26
|
+
B extends Array<unknown>,
|
|
27
|
+
>(
|
|
28
|
+
a: A,
|
|
29
|
+
b: B,
|
|
30
|
+
): b is B
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Returns `true` if all elements of array `a` strict-equal array `b`.
|
|
34
|
+
|
|
35
|
+
### arrayPadLeft
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const arrayPadLeft = <T>(
|
|
39
|
+
input: T[],
|
|
40
|
+
length: number,
|
|
41
|
+
value: T = null as unknown as T,
|
|
42
|
+
): T[]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Inserts `length`-n of `value` at the start of array `input`.
|
|
46
|
+
Modifies array in-place and returns it.
|
|
47
|
+
|
|
48
|
+
### arrayPadRight
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const arrayPadRight = <T>(
|
|
52
|
+
input: T[],
|
|
53
|
+
length: number,
|
|
54
|
+
value: T = null as unknown as T,
|
|
55
|
+
): T[]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Inserts `length`-n of `value` at the end of array `input`.
|
|
59
|
+
Modifies array in-place and returns it.
|
|
60
|
+
|
|
61
|
+
### bufferChunks
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
const bufferChunks = (input: Buffer, chunkSize = 1): Buffer[]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Splits Buffer `input` into chunks of size `chunkSize` each.
|
|
68
|
+
Returns array of Buffer chunks. Throws if `input` Buffer is smaller than `chunkSize`.
|
|
69
|
+
|
|
70
|
+
### concatBytes
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
const concatBytes = (input: number[]): Buffer
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Concatenates number-array as bytes and returns as Buffer.
|
|
77
|
+
|
|
78
|
+
### humanPayload
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
const humanPayload = (input: Buffer): string
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Pretty-prints Buffer `input`’s binary contents in a human readable format, represented as binary, decimal and hexadecimal:
|
|
85
|
+
|
|
86
|
+
```txt
|
|
87
|
+
0b00000000 | 0b00000001 | 0b00000010 | 0b00001111 | 0b00010000
|
|
88
|
+
0 | 1 | 2 | 15 | 16
|
|
89
|
+
0x00 | 0x01 | 0x02 | 0x0f | 0x10
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Returns pre-formatted multi-line string.
|
|
93
|
+
|
|
94
|
+
### jsonParseGuarded
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
const jsonParseGuarded = <T>(input: unknown): T | Error
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Guarded JSON-parse. Tries to parse _anything_ in `input`, returns `JSON.parse` result. Returns Error if input is not a string. If parsing of the string fails, catches the Error and returns it. Error is returned instead of thrown to ease implementation of fallback code paths.
|
|
101
|
+
|
|
102
|
+
### numberToDigits
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
const numberToDigits = (
|
|
106
|
+
input: number,
|
|
107
|
+
pad = 0,
|
|
108
|
+
radix = 10,
|
|
109
|
+
): number[]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Splits number in `input` into single digits and returns them as number-array. Throws if input is not an integer.
|
|
113
|
+
|
|
114
|
+
### readNumber
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
const readNumber = (input: Buffer, bytes = 1): number
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Read number value from Buffer `input` with number of `bytes`. Throws if the buffer isn’t long enough to fit the desired byte count.
|
|
121
|
+
|
|
122
|
+
* `bytes` = 1 → UInt8
|
|
123
|
+
* `bytes` = 2 → UInt16LE
|
|
124
|
+
* `bytes` = 4 → UInt32LE
|
|
125
|
+
|
|
126
|
+
Throws otherwise.
|
|
127
|
+
|
|
128
|
+
### booleanToBuffer
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
const booleanToBuffer = (input: boolean): Buffer
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Turns boolean `input` into `trueBuffer` or `falseBuffer` respectively.
|
|
135
|
+
|
|
136
|
+
### bufferToBoolean
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
const bufferToBoolean = (input: Buffer): boolean
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Turns Buffer `input` into boolean. A buffer whose first byte is zero is considered false, everything else is considered true. Throws if Buffer isn’t long enough.
|
|
143
|
+
|
|
144
|
+
### swapByte
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
const swapByte = (input: number): number
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Bitwise-invert the the `input` value. Use for single byte values.
|
|
151
|
+
|
|
152
|
+
### writeNumber
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
const writeNumber = (input: number, bytes = 1): Buffer
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Write number value from `input` with number of `bytes` into Buffer. Throws if the number cannot be represented using the desired byte count.
|
|
159
|
+
|
|
160
|
+
* `bytes` = 1 → UInt8
|
|
161
|
+
* `bytes` = 2 → UInt16LE
|
|
162
|
+
* `bytes` = 4 → UInt32LE
|
|
163
|
+
|
|
164
|
+
Throws otherwise.
|
|
165
|
+
|
|
166
|
+
## number
|
|
167
|
+
|
|
168
|
+
### bitRange
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
const bitRange = (count: number): number
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Returns the number bit range of given bit length in `count`, e.g.
|
|
175
|
+
|
|
176
|
+
* 4 → 15
|
|
177
|
+
* 8 → 255
|
|
178
|
+
* 16 → 65535
|
|
179
|
+
|
|
180
|
+
### byteRange
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
const byteRange = (count: number): number
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Returns the number range of given byte length in `count`, e.g. 4 → 4294967295.
|
package/dist/data.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export declare const falseBuffer: Buffer<ArrayBuffer>;
|
|
|
3
3
|
export declare const trueBuffer: Buffer<ArrayBuffer>;
|
|
4
4
|
export declare const arrayCompare: <A extends Array<unknown>, B extends Array<unknown>>(a: A, b: B) => b is B;
|
|
5
5
|
export declare const arrayPadLeft: <T>(input: T[], length: number, value?: T) => T[];
|
|
6
|
-
export declare const bufferChunks: (input: Buffer, chunkSize?: number) => Buffer[];
|
|
7
6
|
export declare const arrayPadRight: <T>(input: T[], length: number, value?: T) => T[];
|
|
7
|
+
export declare const bufferChunks: (input: Buffer, chunkSize?: number) => Buffer[];
|
|
8
8
|
export declare const concatBytes: (input: number[]) => Buffer;
|
|
9
9
|
export declare const humanPayload: (input: Buffer) => string;
|
|
10
10
|
export declare const jsonParseGuarded: <T>(input: unknown) => T | Error;
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,qBAAkB,CAAC;AAC3C,eAAO,MAAM,WAAW,qBAAe,CAAC;AACxC,eAAO,MAAM,UAAU,qBAAe,CAAC;AAEvC,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACxB,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAExB,GAAG,CAAC,EACJ,GAAG,CAAC,KACH,CAAC,IAAI,CAYP,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAC5B,OAAO,CAAC,EAAE,EACV,QAAQ,MAAM,EACd,QAAO,CAAwB,KAC9B,CAAC,EAMH,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,EAC7B,OAAO,CAAC,EAAE,EACV,QAAQ,MAAM,EACd,QAAO,CAAwB,KAC9B,CAAC,EAMH,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,kBAAa,KAAG,MAAM,EAUjE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,KAAG,MAA4B,CAAC;AAE3E,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAuB5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,OAAO,OAAO,KAAG,CAAC,GAAG,KAQxD,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,MAAM,EACb,YAAO,EACP,cAAU,KACT,MAAM,EAYR,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,cAAS,KAAG,MAmBrD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,MACf,CAAC;AAEnC,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,OACjB,CAAC;AAEhC,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,MAQxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,cAAS,KAAG,MAyBtD,CAAC"}
|
package/dist/data.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { byteRange } from './number.js';
|
|
1
2
|
export const emptyBuffer = Buffer.from([]);
|
|
2
3
|
export const falseBuffer = Buffer.of(0);
|
|
3
4
|
export const trueBuffer = Buffer.of(1);
|
|
@@ -19,6 +20,12 @@ export const arrayPadLeft = (input, length, value = null) => {
|
|
|
19
20
|
}
|
|
20
21
|
return input;
|
|
21
22
|
};
|
|
23
|
+
export const arrayPadRight = (input, length, value = null) => {
|
|
24
|
+
while (input.length >= length) {
|
|
25
|
+
input.push(value);
|
|
26
|
+
}
|
|
27
|
+
return input;
|
|
28
|
+
};
|
|
22
29
|
export const bufferChunks = (input, chunkSize = 1) => {
|
|
23
30
|
if (input.length < chunkSize)
|
|
24
31
|
throw new Error('input buffer too small');
|
|
@@ -28,12 +35,6 @@ export const bufferChunks = (input, chunkSize = 1) => {
|
|
|
28
35
|
}
|
|
29
36
|
return result;
|
|
30
37
|
};
|
|
31
|
-
export const arrayPadRight = (input, length, value = null) => {
|
|
32
|
-
while (input.length >= length) {
|
|
33
|
-
input.push(value);
|
|
34
|
-
}
|
|
35
|
-
return input;
|
|
36
|
-
};
|
|
37
38
|
export const concatBytes = (input) => Buffer.from(input);
|
|
38
39
|
export const humanPayload = (input) => {
|
|
39
40
|
const payload = [...input];
|
|
@@ -110,7 +111,7 @@ export const swapByte = (input) => {
|
|
|
110
111
|
return byte;
|
|
111
112
|
};
|
|
112
113
|
export const writeNumber = (input, bytes = 1) => {
|
|
113
|
-
if (input < 0 || input
|
|
114
|
+
if (input < 0 || input > byteRange(bytes)) {
|
|
114
115
|
throw new Error('number cannot be represented');
|
|
115
116
|
}
|
|
116
117
|
const cache = Buffer.alloc(bytes);
|
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,CAI1B,CAAI,EACJ,CAAI,EACI,EAAE;IACV,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAExC,+CAA+C;IAC/C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACjD,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAExB,IAAI,MAAM,KAAK,MAAM;YAAE,OAAO,KAAK,CAAC;IACtC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,KAAU,EACV,MAAc,EACd,QAAW,IAAoB,EAC1B,EAAE;IACP,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAA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