@thi.ng/strings 3.9.3 → 3.9.5
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 +1 -1
- package/README.md +1 -1
- package/entities.d.ts +1 -0
- package/escape.d.ts +2 -1
- package/hollerith.d.ts +1 -0
- package/package.json +8 -9
- package/range.d.ts +1 -1
- package/utf8.d.ts +3 -2
- package/uuid.d.ts +3 -3
- package/vector.d.ts +5 -5
- package/word-wrap.d.ts +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/entities.d.ts
CHANGED
package/escape.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export declare const ESCAPES_REV: Record<number, string>;
|
|
|
5
5
|
* backslash escape sequences.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* - Well-known low-ASCII control chars will be escaped using backslash, e.g.
|
|
9
10
|
* 0x0a => `\n`
|
|
10
11
|
* - Non-BMP chars will be escaped using `\Uxxxxxxxx`
|
|
11
12
|
* - Chars outside 0x20 - 0x7e range will be escaped using `\uxxxxx`
|
package/hollerith.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/strings",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.5",
|
|
4
4
|
"description": "Various string formatting & utility functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
34
|
"clean": "bun ../../tools/src/clean-package.ts",
|
|
35
35
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
37
36
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
38
37
|
"pub": "yarn npm publish --access public",
|
|
39
38
|
"test": "bun test",
|
|
40
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/errors": "^2.5.
|
|
45
|
-
"@thi.ng/hex": "^2.3.
|
|
46
|
-
"@thi.ng/memoize": "^4.0.
|
|
42
|
+
"@thi.ng/api": "^8.11.20",
|
|
43
|
+
"@thi.ng/errors": "^2.5.26",
|
|
44
|
+
"@thi.ng/hex": "^2.3.64",
|
|
45
|
+
"@thi.ng/memoize": "^4.0.10"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"esbuild": "^0.
|
|
50
|
-
"typedoc": "^0.27.
|
|
48
|
+
"esbuild": "^0.25.0",
|
|
49
|
+
"typedoc": "^0.27.7",
|
|
51
50
|
"typescript": "^5.7.3"
|
|
52
51
|
},
|
|
53
52
|
"keywords": [
|
|
@@ -211,5 +210,5 @@
|
|
|
211
210
|
"thi.ng": {
|
|
212
211
|
"year": 2015
|
|
213
212
|
},
|
|
214
|
-
"gitHead": "
|
|
213
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
215
214
|
}
|
package/range.d.ts
CHANGED
package/utf8.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const utf8Length: (str: string) => number;
|
|
7
7
|
/**
|
|
8
8
|
* Non-transducer version of
|
|
9
|
-
* [`utf8Decode
|
|
9
|
+
* [`utf8Decode`](https://docs.thi.ng/umbrella/transducers-binary/functions/utf8Decode.html).
|
|
10
10
|
* Decodes `num` bytes from `start` index in given byte buffer. In Firefox this
|
|
11
11
|
* is much faster than using the `TextDecoder` API.
|
|
12
12
|
*
|
|
@@ -17,7 +17,7 @@ export declare const utf8Length: (str: string) => number;
|
|
|
17
17
|
export declare const utf8Decode: (buf: Uint8Array, start: number, num: number) => string;
|
|
18
18
|
/**
|
|
19
19
|
* Non-transducer version of
|
|
20
|
-
* [`utf8Encode
|
|
20
|
+
* [`utf8Encode`](https://docs.thi.ng/umbrella/transducers-binary/functions/utf8Encode.html).
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
23
|
* If `capacity` is given, initializes the byte array to that size (and assumes
|
|
@@ -27,6 +27,7 @@ export declare const utf8Decode: (buf: Uint8Array, start: number, num: number) =
|
|
|
27
27
|
* `4 * src.length`.
|
|
28
28
|
*
|
|
29
29
|
* Based on:
|
|
30
|
+
*
|
|
30
31
|
* - https://github.com/thi-ng/umbrella/blob/main/packages/transducers-binary/src/utf8.ts
|
|
31
32
|
* - https://gist.github.com/pascaldekloe/62546103a1576803dade9269ccf76330
|
|
32
33
|
*
|
package/uuid.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Same as [`uuid
|
|
2
|
+
* Same as [`uuid`](https://docs.thi.ng/umbrella/hex/functions/uuid.html).
|
|
3
3
|
* Returns UUID formatted string of given byte array from optional start index
|
|
4
4
|
* `i` (default: 0). Array must have min. length
|
|
5
5
|
* 16.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Use [`uuid
|
|
9
|
-
*
|
|
8
|
+
* Use [`uuid`](https://docs.thi.ng/umbrella/uuid/functions/uuid.html) to also
|
|
9
|
+
* generate an UUID from scratch (rather than just format one).
|
|
10
10
|
*
|
|
11
11
|
* @param id -
|
|
12
12
|
* @param i -
|
package/vector.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import type { Stringer } from "./api.js";
|
|
|
3
3
|
* Higher order formatter for n-D vectors, with each element formatted using
|
|
4
4
|
* `prec` and using optional delimiter and pre/postfixes.
|
|
5
5
|
*
|
|
6
|
-
* @size - vector size (optimized for size 1-4)
|
|
7
|
-
* @prec - precision (see {@link float}) or existing number formatter
|
|
8
|
-
* @delim - delimiter (default: `,`)
|
|
9
|
-
* @pre - prefix (default: `[`)
|
|
10
|
-
* @post - prefix (default: `]`)
|
|
6
|
+
* @param size - vector size (optimized for size 1-4)
|
|
7
|
+
* @param prec - precision (see {@link float}) or existing number formatter
|
|
8
|
+
* @param delim - delimiter (default: `,`)
|
|
9
|
+
* @param pre - prefix (default: `[`)
|
|
10
|
+
* @param post - prefix (default: `]`)
|
|
11
11
|
*/
|
|
12
12
|
export declare const vector: (size: number, prec?: number | Stringer<number>, delim?: string, pre?: string, post?: string) => Stringer<ArrayLike<number>>;
|
|
13
13
|
//# sourceMappingURL=vector.d.ts.map
|
package/word-wrap.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const SPLIT_ANSI: IWordSplit;
|
|
|
24
24
|
* {@link Line} objects, which can simply be `.join("\n")`ed to convert back
|
|
25
25
|
* into text.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
27
|
+
* See {@link wordWrap} for main user facing alternative.
|
|
28
28
|
*
|
|
29
29
|
* @param line -
|
|
30
30
|
* @param opts -
|
|
@@ -38,7 +38,7 @@ export declare const wordWrapLine: (line: string, opts: Partial<WordWrapOpts>, a
|
|
|
38
38
|
* {@link Line} objects, which can simply be `.join("\n")`ed to convert back
|
|
39
39
|
* into text.
|
|
40
40
|
*
|
|
41
|
-
*
|
|
41
|
+
* See {@link wordWrap} for main user facing alternative.
|
|
42
42
|
*
|
|
43
43
|
* @param lines -
|
|
44
44
|
* @param opts -
|