@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-01-23T15:58:27Z
3
+ - **Last updated**: 2024-01-29T20:39:37Z
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/README.md CHANGED
@@ -7,9 +7,13 @@
7
7
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/strings.svg)
8
8
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
9
9
 
10
- This is a standalone project, maintained as part of the
11
- [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo and
12
- anti-framework.
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.43 KB
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.8",
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.17",
39
- "@thi.ng/errors": "^2.4.11",
40
- "@thi.ng/hex": "^2.3.29",
41
- "@thi.ng/memoize": "^3.1.51"
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": "417b5a7ea7bd54a3b4f086fe0fc2ce8e8933c9b2\n"
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
- * actualy string width).
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
package/word-wrap.js CHANGED
@@ -83,6 +83,7 @@ const wordWrapLines = (lines, opts) => {
83
83
  };
84
84
  const wordWrap = (str, opts) => wordWrapLines(str, opts).join("\n");
85
85
  export {
86
+ Line,
86
87
  SPLIT_ANSI,
87
88
  SPLIT_PLAIN,
88
89
  wordWrap,