@thi.ng/strings 3.3.19 → 3.3.21

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**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-20T16:33:12Z
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
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![strings](https://media.thi.ng/umbrella/banners-20220914/thing-strings.svg?41f4988c)
3
+ # ![@thi.ng/strings](https://media.thi.ng/umbrella/banners-20220914/thing-strings.svg?41f4988c)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/strings.svg)](https://www.npmjs.com/package/@thi.ng/strings)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/strings.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -136,11 +136,8 @@ ES module import:
136
136
 
137
137
  For Node.js REPL:
138
138
 
139
- ```text
140
- # with flag only for < v16
141
- node --experimental-repl-await
142
-
143
- > const strings = await import("@thi.ng/strings");
139
+ ```js
140
+ const strings = await import("@thi.ng/strings");
144
141
  ```
145
142
 
146
143
  Package sizes (brotli'd, pre-treeshake): ESM: 4.29 KB
@@ -195,7 +192,7 @@ fmt("eur", 1.2345, 0.25)
195
192
 
196
193
  ## Authors
197
194
 
198
- Karsten Schmidt
195
+ - [Karsten Schmidt](https://thi.ng)
199
196
 
200
197
  If this project contributes to an academic publication, please cite it as:
201
198
 
@@ -210,4 +207,4 @@ If this project contributes to an academic publication, please cite it as:
210
207
 
211
208
  ## License
212
209
 
213
- &copy; 2015 - 2022 Karsten Schmidt // Apache Software License 2.0
210
+ &copy; 2015 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -4,8 +4,8 @@ import type { Fn, Fn2, FnU } from "@thi.ng/api";
4
4
  * https://en.wikipedia.org/wiki/Byte_order_mark
5
5
  */
6
6
  export declare const BOM = "\uFEFF";
7
- export declare type Stringer<T> = (x: T, ...xs: any[]) => string;
8
- export declare type FnS = FnU<string>;
7
+ export type Stringer<T> = (x: T, ...xs: any[]) => string;
8
+ export type FnS = FnU<string>;
9
9
  export interface WordWrapOpts {
10
10
  /**
11
11
  * Target line width for word wrapping.
package/hollerith.d.ts CHANGED
@@ -10,7 +10,7 @@ import type { Stringer } from "./api.js";
10
10
  * hstr(null) // ""
11
11
  * ```
12
12
  *
13
- * {@link https://en.wikipedia.org/wiki/Hollerith_constant}
13
+ * https://en.wikipedia.org/wiki/Hollerith_constant
14
14
  *
15
15
  * @param x -
16
16
  */
package/hollerith.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * hstr(null) // ""
10
10
  * ```
11
11
  *
12
- * {@link https://en.wikipedia.org/wiki/Hollerith_constant}
12
+ * https://en.wikipedia.org/wiki/Hollerith_constant
13
13
  *
14
14
  * @param x -
15
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/strings",
3
- "version": "3.3.19",
3
+ "version": "3.3.21",
4
4
  "description": "Various string formatting & utility functions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/errors": "^2.2.5",
39
- "@thi.ng/hex": "^2.3.1",
40
- "@thi.ng/memoize": "^3.1.18"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/errors": "^2.2.6",
39
+ "@thi.ng/hex": "^2.3.2",
40
+ "@thi.ng/memoize": "^3.1.20"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.6",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "ansi",
@@ -200,5 +200,5 @@
200
200
  "thi.ng": {
201
201
  "year": 2015
202
202
  },
203
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
203
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
204
204
  }
package/slugify.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Based on:
4
- * {@link https://medium.com/@matthagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1}
4
+ * https://medium.com/@matthagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1
5
5
  *
6
6
  * @example
7
7
  * ```ts
package/slugify.js CHANGED
@@ -3,7 +3,7 @@ const dest = "aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------";
3
3
  const re = new RegExp(src.split("").join("|"), "g");
4
4
  /**
5
5
  * Based on:
6
- * {@link https://medium.com/@matthagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1}
6
+ * https://medium.com/@matthagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1
7
7
  *
8
8
  * @example
9
9
  * ```ts
package/units.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Stringer } from "./api.js";
2
- declare type UnitDefs = [number, string, number?][];
2
+ 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>;
package/uuid.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /**
2
- * Same as {@link @thi.ng/hex#uuid}. Returns UUID formatted string of given byte
3
- * array from optional start index `i` (default: 0). Array must have min. length
2
+ * Same as [`uuid()`](https://docs.thi.ng/umbrella/hex/functions/uuid.html).
3
+ * Returns UUID formatted string of given byte array from optional start index
4
+ * `i` (default: 0). Array must have min. length
4
5
  * 16.
5
6
  *
6
7
  * @remarks
7
- * Use {@link @thi.ng/random#uuid} to also generate an UUID from scratch (rather
8
- * than just format one).
8
+ * Use [`uuid()`](https://docs.thi.ng/umbrella/random/functions/uuid.html) to
9
+ * also generate an UUID from scratch (rather than just format one).
9
10
  *
10
11
  * @param id -
11
12
  * @param i -
package/uuid.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { uuid as $uuid } from "@thi.ng/hex";
2
2
  /**
3
- * Same as {@link @thi.ng/hex#uuid}. Returns UUID formatted string of given byte
4
- * array from optional start index `i` (default: 0). Array must have min. length
3
+ * Same as [`uuid()`](https://docs.thi.ng/umbrella/hex/functions/uuid.html).
4
+ * Returns UUID formatted string of given byte array from optional start index
5
+ * `i` (default: 0). Array must have min. length
5
6
  * 16.
6
7
  *
7
8
  * @remarks
8
- * Use {@link @thi.ng/random#uuid} to also generate an UUID from scratch (rather
9
- * than just format one).
9
+ * Use [`uuid()`](https://docs.thi.ng/umbrella/random/functions/uuid.html) to
10
+ * also generate an UUID from scratch (rather than just format one).
10
11
  *
11
12
  * @param id -
12
13
  * @param i -