@cto.af/linewrap-cli 3.0.0 → 3.0.1
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 +0 -4
- package/bin/linewrap.js +1 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -50,10 +50,6 @@ Options:
|
|
|
50
50
|
will be inserted before each line Default: " "
|
|
51
51
|
--indentEmpty if the input string is empty, should we still
|
|
52
52
|
indent? Default: false
|
|
53
|
-
--isNewline <regex> a regular expression to replace newlines in the
|
|
54
|
-
input. Empty to leave newlines in place.
|
|
55
|
-
Default: "[^\\S\\r\\n\\v\\f\\x85\\u2028\
|
|
56
|
-
\u2029]*[\\r\\n\\v\\f\\x85\\u2028\\u2029]+\\s*"
|
|
57
53
|
-l,--locale <iso location> locale for grapheme segmentation. Has very
|
|
58
54
|
little effect at the moment
|
|
59
55
|
--newline <string> how to separate the lines of output Default:
|
package/bin/linewrap.js
CHANGED
|
@@ -61,12 +61,6 @@ const config = {
|
|
|
61
61
|
default: LineWrap.DEFAULT_OPTIONS.indentEmpty,
|
|
62
62
|
description: 'if the input string is empty, should we still indent?',
|
|
63
63
|
},
|
|
64
|
-
isNewline: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
default: LineWrap.DEFAULT_OPTIONS.isNewline.source,
|
|
67
|
-
argumentName: 'regex',
|
|
68
|
-
description: 'a regular expression to replace newlines in the input. Empty to leave newlines in place.',
|
|
69
|
-
},
|
|
70
64
|
locale: {
|
|
71
65
|
short: 'l',
|
|
72
66
|
type: 'string',
|
|
@@ -219,11 +213,7 @@ export async function main(
|
|
|
219
213
|
verbose: values.verbose,
|
|
220
214
|
width: parseInt(values.width, 10),
|
|
221
215
|
};
|
|
222
|
-
|
|
223
|
-
opts.isNewline = (values.isNewline.length === 0) ?
|
|
224
|
-
null :
|
|
225
|
-
new RegExp(values.isNewline, 'gu');
|
|
226
|
-
}
|
|
216
|
+
|
|
227
217
|
if (values.verbose) {
|
|
228
218
|
process.stdout.write(inspect(opts));
|
|
229
219
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cto.af/linewrap-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Wrap lines using the Unicode Line Breaking algorithm from UAX #14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"repository": "cto-af/linewrap-cli",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cto.af/linewrap": "3.
|
|
29
|
+
"@cto.af/linewrap": "3.2.0",
|
|
30
30
|
"minus-h": "3.0.0"
|
|
31
31
|
},
|
|
32
|
-
"packageManager": "pnpm@10.
|
|
32
|
+
"packageManager": "pnpm@10.12.1",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=20"
|
|
35
35
|
}
|