@thi.ng/strings 3.9.30 → 3.9.31
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/README.md +1 -1
- package/groups.js +2 -2
- package/package.json +6 -6
- package/word-wrap.js +2 -2
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 211 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/groups.js
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.31",
|
|
4
4
|
"description": "Various string formatting & utility functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/errors": "^2.5.
|
|
44
|
-
"@thi.ng/hex": "^2.4.
|
|
45
|
-
"@thi.ng/memoize": "^4.0.
|
|
42
|
+
"@thi.ng/api": "^8.12.10",
|
|
43
|
+
"@thi.ng/errors": "^2.5.50",
|
|
44
|
+
"@thi.ng/hex": "^2.4.3",
|
|
45
|
+
"@thi.ng/memoize": "^4.0.34"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"esbuild": "^0.27.0",
|
|
@@ -211,5 +211,5 @@
|
|
|
211
211
|
"thi.ng": {
|
|
212
212
|
"year": 2015
|
|
213
213
|
},
|
|
214
|
-
"gitHead": "
|
|
214
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
215
215
|
}
|
package/word-wrap.js
CHANGED
|
@@ -67,7 +67,7 @@ const wordWrapLine = (line, opts, acc = []) => {
|
|
|
67
67
|
splitter: SPLIT_PLAIN,
|
|
68
68
|
...opts
|
|
69
69
|
};
|
|
70
|
-
for (
|
|
70
|
+
for (const word of split(line, opts.delimWord || /\s/g)) {
|
|
71
71
|
const curr = acc[acc.length - 1];
|
|
72
72
|
__wrapWord(word, $opts, curr && curr.n > 0 ? curr.n + 1 : 0, acc);
|
|
73
73
|
}
|
|
@@ -75,7 +75,7 @@ const wordWrapLine = (line, opts, acc = []) => {
|
|
|
75
75
|
};
|
|
76
76
|
const wordWrapLines = (lines, opts) => {
|
|
77
77
|
let acc = [];
|
|
78
|
-
for (
|
|
78
|
+
for (const line of split(lines, opts.delimLine)) {
|
|
79
79
|
acc = acc.concat(wordWrapLine(line, opts));
|
|
80
80
|
}
|
|
81
81
|
return acc;
|