@thi.ng/strings 3.6.3 → 3.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-10-30T14:31:56Z
3
+ - **Last updated**: 2023-11-09T10:02: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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.6.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.6.5) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  ## [3.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.6.0) (2023-09-19)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -141,7 +141,7 @@ For Node.js REPL:
141
141
  const strings = await import("@thi.ng/strings");
142
142
  ```
143
143
 
144
- Package sizes (brotli'd, pre-treeshake): ESM: 4.86 KB
144
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.92 KB
145
145
 
146
146
  ## Dependencies
147
147
 
@@ -163,6 +163,7 @@ directory are using this package:
163
163
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/crypto-chart.png" width="240"/> | Basic crypto-currency candle chart with multiple moving averages plots | [Demo](https://demo.thi.ng/umbrella/crypto-chart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/crypto-chart) |
164
164
  | | Basic SPA example with atom-based UI router | [Demo](https://demo.thi.ng/umbrella/login-form/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/login-form) |
165
165
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/mastodon-feed.jpg" width="240"/> | Mastodon API feed reader with support for different media types, fullscreen media modal, HTML rewriting | [Demo](https://demo.thi.ng/umbrella/mastodon-feed/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/mastodon-feed) |
166
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/procedural-text) |
166
167
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/render-audio.png" width="240"/> | Generative audio synth offline renderer and WAV file export | [Demo](https://demo.thi.ng/umbrella/render-audio/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/render-audio) |
167
168
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rstream-spreadsheet.png" width="240"/> | rstream based spreadsheet w/ S-expression formula DSL | [Demo](https://demo.thi.ng/umbrella/rstream-spreadsheet/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-spreadsheet) |
168
169
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/xml-converter.png" width="240"/> | XML/HTML/SVG to hiccup/JS conversion | [Demo](https://demo.thi.ng/umbrella/xml-converter/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/xml-converter) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/strings",
3
- "version": "3.6.3",
3
+ "version": "3.6.5",
4
4
  "description": "Various string formatting & utility functions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,23 +28,22 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
- "test": "testament test"
33
+ "test": "bun test"
35
34
  },
36
35
  "dependencies": {
37
- "@thi.ng/api": "^8.9.6",
38
- "@thi.ng/errors": "^2.4.0",
39
- "@thi.ng/hex": "^2.3.18",
40
- "@thi.ng/memoize": "^3.1.40"
36
+ "@thi.ng/api": "^8.9.7",
37
+ "@thi.ng/errors": "^2.4.1",
38
+ "@thi.ng/hex": "^2.3.19",
39
+ "@thi.ng/memoize": "^3.1.41"
41
40
  },
42
41
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.38.0",
44
- "@thi.ng/testament": "^0.3.24",
42
+ "@microsoft/api-extractor": "^7.38.2",
43
+ "@thi.ng/testament": "^0.4.0",
45
44
  "rimraf": "^5.0.5",
46
45
  "tools": "^0.0.1",
47
- "typedoc": "^0.25.2",
46
+ "typedoc": "^0.25.3",
48
47
  "typescript": "^5.2.2"
49
48
  },
50
49
  "keywords": [
@@ -200,5 +199,5 @@
200
199
  "thi.ng": {
201
200
  "year": 2015
202
201
  },
203
- "gitHead": "bfa16829786146bd24df3cdbd44649a45a603e44\n"
202
+ "gitHead": "9f4d8ad79bca1d68214fbc9bbc5fb55f5a445f7e\n"
204
203
  }
package/word-wrap.js CHANGED
@@ -8,9 +8,9 @@ import { split } from "./split.js";
8
8
  * @internal
9
9
  */
10
10
  class Line {
11
+ n = 0;
12
+ w = [];
11
13
  constructor(word, n) {
12
- this.n = 0;
13
- this.w = [];
14
14
  word != null && this.add(word, n);
15
15
  }
16
16
  add(word, n = word.length) {