@thi.ng/strings 3.7.8 → 3.7.10
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 +8 -4
- package/package.json +6 -6
- package/units.d.ts +1 -2
- package/word-wrap.d.ts +2 -5
- package/word-wrap.js +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|

|
|
8
8
|
[](https://mastodon.thi.ng/@toxi)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> This is one of 189 standalone projects, maintained as part
|
|
12
|
+
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
13
|
+
> and anti-framework.
|
|
14
|
+
>
|
|
15
|
+
> 🚀 Help me to work full-time on these projects by [sponsoring me on
|
|
16
|
+
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
13
17
|
|
|
14
18
|
- [About](#about)
|
|
15
19
|
- [General](#general)
|
|
@@ -142,7 +146,7 @@ For Node.js REPL:
|
|
|
142
146
|
const strings = await import("@thi.ng/strings");
|
|
143
147
|
```
|
|
144
148
|
|
|
145
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 5.
|
|
149
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 5.44 KB
|
|
146
150
|
|
|
147
151
|
## Dependencies
|
|
148
152
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/strings",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.10",
|
|
4
4
|
"description": "Various string formatting & utility functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/errors": "^2.4.
|
|
40
|
-
"@thi.ng/hex": "^2.3.
|
|
41
|
-
"@thi.ng/memoize": "^3.1.
|
|
38
|
+
"@thi.ng/api": "^8.9.19",
|
|
39
|
+
"@thi.ng/errors": "^2.4.12",
|
|
40
|
+
"@thi.ng/hex": "^2.3.31",
|
|
41
|
+
"@thi.ng/memoize": "^3.1.53"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@microsoft/api-extractor": "^7.39.0",
|
|
@@ -203,5 +203,5 @@
|
|
|
203
203
|
"thi.ng": {
|
|
204
204
|
"year": 2015
|
|
205
205
|
},
|
|
206
|
-
"gitHead": "
|
|
206
|
+
"gitHead": "20909ffc46f23f61ec7647e8d27ed17752ce9828\n"
|
|
207
207
|
}
|
package/units.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Stringer } from "./api.js";
|
|
2
|
-
type UnitDefs = [number, string, number?][];
|
|
2
|
+
export type UnitDefs = [number, string, number?][];
|
|
3
3
|
export declare const units: (exp: UnitDefs, base: string, prec?: number) => Stringer<number>;
|
|
4
4
|
export declare const bits: Stringer<number>;
|
|
5
5
|
export declare const bytes: Stringer<number>;
|
|
@@ -7,5 +7,4 @@ export declare const seconds: Stringer<number>;
|
|
|
7
7
|
export declare const meters: Stringer<number>;
|
|
8
8
|
export declare const grams: Stringer<number>;
|
|
9
9
|
export declare const unitless: Stringer<number>;
|
|
10
|
-
export {};
|
|
11
10
|
//# sourceMappingURL=units.d.ts.map
|
package/word-wrap.d.ts
CHANGED
|
@@ -2,11 +2,9 @@ import type { IWordSplit, WordWrapOpts } from "./api.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal representation of a single line (for word wrapping purposes). A thin
|
|
4
4
|
* wrapper of individual word and the _logical_ line length (rather than the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
5
|
+
* actually string width).
|
|
8
6
|
*/
|
|
9
|
-
declare class Line {
|
|
7
|
+
export declare class Line {
|
|
10
8
|
n: number;
|
|
11
9
|
w: string[];
|
|
12
10
|
constructor(word?: string, n?: number);
|
|
@@ -54,5 +52,4 @@ export declare const wordWrapLines: (lines: string, opts: Partial<WordWrapOpts>)
|
|
|
54
52
|
* @param opts -
|
|
55
53
|
*/
|
|
56
54
|
export declare const wordWrap: (str: string, opts: Partial<WordWrapOpts>) => string;
|
|
57
|
-
export {};
|
|
58
55
|
//# sourceMappingURL=word-wrap.d.ts.map
|