@thi.ng/strings 2.1.7 → 3.1.0

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/index.d.ts CHANGED
@@ -1,35 +1,37 @@
1
- export * from "./api";
2
- export * from "./ansi";
3
- export * from "./case";
4
- export * from "./center";
5
- export * from "./cursor";
6
- export * from "./escape";
7
- export * from "./float";
8
- export * from "./format";
9
- export * from "./groups";
10
- export * from "./hollerith";
11
- export * from "./int";
12
- export * from "./interpolate";
13
- export * from "./join";
14
- export * from "./pad-left";
15
- export * from "./pad-right";
16
- export * from "./parse";
17
- export * from "./percent";
18
- export * from "./radix";
19
- export * from "./range";
20
- export * from "./repeat";
21
- export * from "./ruler";
22
- export * from "./slugify";
23
- export * from "./splice";
24
- export * from "./split";
25
- export * from "./stringify";
26
- export * from "./tabs";
27
- export * from "./trim";
28
- export * from "./truncate";
29
- export * from "./truncate-left";
30
- export * from "./units";
31
- export * from "./uuid";
32
- export * from "./vector";
33
- export * from "./wrap";
34
- export * from "./word-wrap";
1
+ export * from "./api.js";
2
+ export * from "./ansi.js";
3
+ export * from "./case.js";
4
+ export * from "./center.js";
5
+ export * from "./cursor.js";
6
+ export * from "./entities.js";
7
+ export * from "./escape.js";
8
+ export * from "./float.js";
9
+ export * from "./format.js";
10
+ export * from "./groups.js";
11
+ export * from "./hollerith.js";
12
+ export * from "./initials.js";
13
+ export * from "./int.js";
14
+ export * from "./interpolate.js";
15
+ export * from "./join.js";
16
+ export * from "./pad-left.js";
17
+ export * from "./pad-right.js";
18
+ export * from "./parse.js";
19
+ export * from "./percent.js";
20
+ export * from "./radix.js";
21
+ export * from "./range.js";
22
+ export * from "./repeat.js";
23
+ export * from "./ruler.js";
24
+ export * from "./slugify.js";
25
+ export * from "./splice.js";
26
+ export * from "./split.js";
27
+ export * from "./stringify.js";
28
+ export * from "./tabs.js";
29
+ export * from "./trim.js";
30
+ export * from "./truncate.js";
31
+ export * from "./truncate-left.js";
32
+ export * from "./units.js";
33
+ export * from "./uuid.js";
34
+ export * from "./vector.js";
35
+ export * from "./wrap.js";
36
+ export * from "./word-wrap.js";
35
37
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,34 +1,36 @@
1
- export * from "./api";
2
- export * from "./ansi";
3
- export * from "./case";
4
- export * from "./center";
5
- export * from "./cursor";
6
- export * from "./escape";
7
- export * from "./float";
8
- export * from "./format";
9
- export * from "./groups";
10
- export * from "./hollerith";
11
- export * from "./int";
12
- export * from "./interpolate";
13
- export * from "./join";
14
- export * from "./pad-left";
15
- export * from "./pad-right";
16
- export * from "./parse";
17
- export * from "./percent";
18
- export * from "./radix";
19
- export * from "./range";
20
- export * from "./repeat";
21
- export * from "./ruler";
22
- export * from "./slugify";
23
- export * from "./splice";
24
- export * from "./split";
25
- export * from "./stringify";
26
- export * from "./tabs";
27
- export * from "./trim";
28
- export * from "./truncate";
29
- export * from "./truncate-left";
30
- export * from "./units";
31
- export * from "./uuid";
32
- export * from "./vector";
33
- export * from "./wrap";
34
- export * from "./word-wrap";
1
+ export * from "./api.js";
2
+ export * from "./ansi.js";
3
+ export * from "./case.js";
4
+ export * from "./center.js";
5
+ export * from "./cursor.js";
6
+ export * from "./entities.js";
7
+ export * from "./escape.js";
8
+ export * from "./float.js";
9
+ export * from "./format.js";
10
+ export * from "./groups.js";
11
+ export * from "./hollerith.js";
12
+ export * from "./initials.js";
13
+ export * from "./int.js";
14
+ export * from "./interpolate.js";
15
+ export * from "./join.js";
16
+ export * from "./pad-left.js";
17
+ export * from "./pad-right.js";
18
+ export * from "./parse.js";
19
+ export * from "./percent.js";
20
+ export * from "./radix.js";
21
+ export * from "./range.js";
22
+ export * from "./repeat.js";
23
+ export * from "./ruler.js";
24
+ export * from "./slugify.js";
25
+ export * from "./splice.js";
26
+ export * from "./split.js";
27
+ export * from "./stringify.js";
28
+ export * from "./tabs.js";
29
+ export * from "./trim.js";
30
+ export * from "./truncate.js";
31
+ export * from "./truncate-left.js";
32
+ export * from "./units.js";
33
+ export * from "./uuid.js";
34
+ export * from "./vector.js";
35
+ export * from "./wrap.js";
36
+ export * from "./word-wrap.js";
package/initials.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Takes an array of string parts and returns a new string of each part's
3
+ * initial character. The `mode` arg can be used to customize result casing
4
+ * (default: uppercase). If `mode` is null, the original casing will be kept.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * initials(["alicia", "bella", "carerra"]);
9
+ * // "ABC"
10
+ *
11
+ * initials("shader-ast-GLSL".split("-"))
12
+ * // "SAG"
13
+ *
14
+ * initials("Ludwig van Beethoven".split(" "), null)
15
+ * // "LvB"
16
+ * ```
17
+ *
18
+ * @param parts
19
+ * @param mode
20
+ */
21
+ export declare const initials: (parts: string[], mode?: "u" | "l" | null) => string;
22
+ //# sourceMappingURL=initials.d.ts.map
package/initials.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Takes an array of string parts and returns a new string of each part's
3
+ * initial character. The `mode` arg can be used to customize result casing
4
+ * (default: uppercase). If `mode` is null, the original casing will be kept.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * initials(["alicia", "bella", "carerra"]);
9
+ * // "ABC"
10
+ *
11
+ * initials("shader-ast-GLSL".split("-"))
12
+ * // "SAG"
13
+ *
14
+ * initials("Ludwig van Beethoven".split(" "), null)
15
+ * // "LvB"
16
+ * ```
17
+ *
18
+ * @param parts
19
+ * @param mode
20
+ */
21
+ export const initials = (parts, mode = "u") => {
22
+ const res = parts.map((x) => x[0]).join("");
23
+ return mode === "u"
24
+ ? res.toUpperCase()
25
+ : mode === "l"
26
+ ? res.toLowerCase()
27
+ : res;
28
+ };
package/int.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  export declare const int: Stringer<number>;
3
3
  export declare const intLocale: (locale?: string) => Stringer<number>;
4
4
  //# sourceMappingURL=int.d.ts.map
package/int.js CHANGED
@@ -1,3 +1,3 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
2
  export const int = (x) => String(Math.trunc(x));
3
3
  export const intLocale = memoizeJ((locale) => (x) => Math.trunc(x).toLocaleString(locale));
package/interpolate.js CHANGED
@@ -1,4 +1,4 @@
1
- import { illegalArgs } from "@thi.ng/errors";
1
+ import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
2
2
  const TPL = /\{(\d+)\}/g;
3
3
  const TPL_K = /\{([a-z0-9_.-]+)\}/gi;
4
4
  /**
package/join.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Higher-order version of `Array.join()`. Takes separator string `sep`
4
4
  * and returns function which accepts an array and joins all elements w/
package/join.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoize1 } from "@thi.ng/memoize";
1
+ import { memoize1 } from "@thi.ng/memoize/memoize1";
2
2
  /**
3
3
  * Higher-order version of `Array.join()`. Takes separator string `sep`
4
4
  * and returns function which accepts an array and joins all elements w/
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thi.ng/strings",
3
- "version": "2.1.7",
3
+ "version": "3.1.0",
4
4
  "description": "Various string formatting & utility functions",
5
+ "type": "module",
5
6
  "module": "./index.js",
6
- "main": "./lib/index.js",
7
- "umd:main": "./lib/index.umd.js",
8
7
  "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
@@ -24,30 +24,24 @@
24
24
  "author": "Karsten Schmidt <k+npm@thi.ng>",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
- "build": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module",
28
- "build:release": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module all",
29
- "build:es6": "tsc --declaration",
30
- "build:test": "rimraf build && tsc -p test/tsconfig.json",
31
- "build:check": "tsc --isolatedModules --noEmit",
32
- "test": "mocha test",
33
- "cover": "nyc mocha test && nyc report --reporter=lcov",
34
- "clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
35
- "doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
36
- "doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf *.js *.d.ts *.map doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
37
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
38
- "pub": "yarn build:release && yarn publish --access public"
31
+ "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
+ "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
+ "pub": "yarn build && yarn publish --access public",
34
+ "test": "testament test"
39
35
  },
40
36
  "dependencies": {
41
- "@thi.ng/api": "^7.2.0",
42
- "@thi.ng/errors": "^1.3.4",
43
- "@thi.ng/hex": "^1.0.4",
44
- "@thi.ng/memoize": "^2.1.21"
37
+ "@thi.ng/api": "^8.0.4",
38
+ "@thi.ng/errors": "^2.0.4",
39
+ "@thi.ng/hex": "^2.0.4",
40
+ "@thi.ng/memoize": "^3.0.4"
41
+ },
42
+ "devDependencies": {
43
+ "@thi.ng/testament": "^0.1.4"
45
44
  },
46
- "files": [
47
- "*.js",
48
- "*.d.ts",
49
- "lib"
50
- ],
51
45
  "keywords": [
52
46
  "ansi",
53
47
  "composition",
@@ -75,9 +69,128 @@
75
69
  "publishConfig": {
76
70
  "access": "public"
77
71
  },
78
- "sideEffects": false,
72
+ "engines": {
73
+ "node": ">=12.7"
74
+ },
75
+ "files": [
76
+ "*.js",
77
+ "*.d.ts"
78
+ ],
79
+ "exports": {
80
+ ".": {
81
+ "import": "./index.js"
82
+ },
83
+ "./ansi": {
84
+ "import": "./ansi.js"
85
+ },
86
+ "./api": {
87
+ "import": "./api.js"
88
+ },
89
+ "./case": {
90
+ "import": "./case.js"
91
+ },
92
+ "./center": {
93
+ "import": "./center.js"
94
+ },
95
+ "./cursor": {
96
+ "import": "./cursor.js"
97
+ },
98
+ "./entities": {
99
+ "import": "./entities.js"
100
+ },
101
+ "./escape": {
102
+ "import": "./escape.js"
103
+ },
104
+ "./float": {
105
+ "import": "./float.js"
106
+ },
107
+ "./format": {
108
+ "import": "./format.js"
109
+ },
110
+ "./groups": {
111
+ "import": "./groups.js"
112
+ },
113
+ "./hollerith": {
114
+ "import": "./hollerith.js"
115
+ },
116
+ "./initials": {
117
+ "import": "./initials.js"
118
+ },
119
+ "./int": {
120
+ "import": "./int.js"
121
+ },
122
+ "./interpolate": {
123
+ "import": "./interpolate.js"
124
+ },
125
+ "./join": {
126
+ "import": "./join.js"
127
+ },
128
+ "./pad-left": {
129
+ "import": "./pad-left.js"
130
+ },
131
+ "./pad-right": {
132
+ "import": "./pad-right.js"
133
+ },
134
+ "./parse": {
135
+ "import": "./parse.js"
136
+ },
137
+ "./percent": {
138
+ "import": "./percent.js"
139
+ },
140
+ "./radix": {
141
+ "import": "./radix.js"
142
+ },
143
+ "./range": {
144
+ "import": "./range.js"
145
+ },
146
+ "./repeat": {
147
+ "import": "./repeat.js"
148
+ },
149
+ "./ruler": {
150
+ "import": "./ruler.js"
151
+ },
152
+ "./slugify": {
153
+ "import": "./slugify.js"
154
+ },
155
+ "./splice": {
156
+ "import": "./splice.js"
157
+ },
158
+ "./split": {
159
+ "import": "./split.js"
160
+ },
161
+ "./stringify": {
162
+ "import": "./stringify.js"
163
+ },
164
+ "./tabs": {
165
+ "import": "./tabs.js"
166
+ },
167
+ "./trim": {
168
+ "import": "./trim.js"
169
+ },
170
+ "./truncate-left": {
171
+ "import": "./truncate-left.js"
172
+ },
173
+ "./truncate": {
174
+ "import": "./truncate.js"
175
+ },
176
+ "./units": {
177
+ "import": "./units.js"
178
+ },
179
+ "./uuid": {
180
+ "import": "./uuid.js"
181
+ },
182
+ "./vector": {
183
+ "import": "./vector.js"
184
+ },
185
+ "./word-wrap": {
186
+ "import": "./word-wrap.js"
187
+ },
188
+ "./wrap": {
189
+ "import": "./wrap.js"
190
+ }
191
+ },
79
192
  "thi.ng": {
80
193
  "year": 2015
81
194
  },
82
- "gitHead": "d971cb3f9b215a95483f78f1a8614015e331146f"
195
+ "gitHead": "9ff00a103f76cc4917ef3f244132e218f2300a05"
83
196
  }
package/pad-left.js CHANGED
@@ -1,5 +1,5 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
2
- import { repeat } from "./repeat";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
+ import { repeat } from "./repeat.js";
3
3
  /**
4
4
  * @param n - target length
5
5
  * @param ch - pad character(s)
package/pad-right.js CHANGED
@@ -1,5 +1,5 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
2
- import { repeat } from "./repeat";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
+ import { repeat } from "./repeat.js";
3
3
  /**
4
4
  * @param n - target length
5
5
  * @param ch - pad character(s)
package/percent.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Returns {@link Stringer} which formats given fractions as percentage (e.g.
4
4
  * `0.1234 => 12.34%`).
package/radix.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Returns a {@link Stringer} which formats given numbers to `radix`, `len` and
4
4
  * with optional prefix (not included in `len`).
package/radix.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { U16 as $16, U24 as $24, U32 as $32, U64HL, U8 as $8, } from "@thi.ng/hex";
2
- import { memoizeJ } from "@thi.ng/memoize";
3
- import { repeat } from "./repeat";
2
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
3
+ import { repeat } from "./repeat.js";
4
4
  /**
5
5
  * Returns a {@link Stringer} which formats given numbers to `radix`, `len` and
6
6
  * with optional prefix (not included in `len`).
package/repeat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
2
  /**
3
3
  * @param ch - character
4
4
  * @param n - repeat count
package/ruler.js CHANGED
@@ -1,4 +1,4 @@
1
- import { repeat } from "./repeat";
1
+ import { repeat } from "./repeat.js";
2
2
  /**
3
3
  * Returns a ruler-like string of given `width`, using `a` character for major
4
4
  * ticks and `b` for minor ticks.
package/slugify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Based on:
4
4
  * {@link https://medium.com/@matthagemann/the-ultimate-way-to-slugify-a-url-string-in-javascript-b8e4a0d849e1}
package/splice.js CHANGED
@@ -1,4 +1,4 @@
1
- import { illegalArgs } from "@thi.ng/errors";
1
+ import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
2
2
  /**
3
3
  * Forms a new strings which inserts given `insert` string into `src`
4
4
  * string at `from` position and appends remaining `src` chars from
package/stringify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Higher order version of `JSON.stringify()` with the option to treat strings
4
4
  * and numbers differently. If `all` is `false` (default), strings and numbers
package/tabs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { repeat } from "./repeat";
1
+ import { repeat } from "./repeat.js";
2
2
  const nextTab = (x, tabSize) => Math.floor((x + tabSize) / tabSize) * tabSize;
3
3
  /**
4
4
  * Multi-line version of {@link tabsToSpacesLine}.
package/trim.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Higher order trim function (both sides) with support for user defined
4
4
  * trimmable characters (default: whitespace only).
package/trim.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoize1 } from "@thi.ng/memoize";
1
+ import { memoize1 } from "@thi.ng/memoize/memoize1";
2
2
  /**
3
3
  * Higher order trim function (both sides) with support for user defined
4
4
  * trimmable characters (default: whitespace only).
@@ -1,3 +1,3 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  export declare const truncateLeft: (n: number, prefix?: string) => Stringer<string>;
3
3
  //# sourceMappingURL=truncate-left.d.ts.map
package/truncate-left.js CHANGED
@@ -1,2 +1,4 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
2
- export const truncateLeft = memoizeJ((n, prefix = "") => (x) => x.length > n ? prefix + x.substr(x.length - n + prefix.length) : x);
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
+ export const truncateLeft = memoizeJ((n, prefix = "") => (x) => x.length > n
3
+ ? prefix + x.substr(x.length - n + prefix.length)
4
+ : x);
package/truncate.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  export declare const truncate: (n: number, suffix?: string) => Stringer<string>;
3
3
  /**
4
4
  * Alias for {@link truncate}
package/truncate.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
2
  export const truncate = memoizeJ((n, suffix = "") => (x) => x.length > n ? x.substr(0, n - suffix.length) + suffix : x);
3
3
  /**
4
4
  * Alias for {@link truncate}
package/units.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  declare 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>;
package/units.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
2
  export const units = memoizeJ((exp, base, prec = 2) => {
3
3
  const groups = exp
4
4
  .map((x) => [
package/vector.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Higher order formatter for n-D vectors, with each element formatted using
4
4
  * `prec` and using optional delimiter and pre/postfixes.
package/vector.js CHANGED
@@ -1,5 +1,5 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
2
- import { float } from "./float";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
+ import { float } from "./float.js";
3
3
  /**
4
4
  * Higher order formatter for n-D vectors, with each element formatted using
5
5
  * `prec` and using optional delimiter and pre/postfixes.
package/word-wrap.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IWordSplit, WordWrapOpts } from "./api";
1
+ 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
package/word-wrap.js CHANGED
@@ -1,5 +1,5 @@
1
- import { lengthAnsi } from "./ansi";
2
- import { split } from "./split";
1
+ import { lengthAnsi } from "./ansi.js";
2
+ import { split } from "./split.js";
3
3
  /**
4
4
  * Internal representation of a single line (for word wrapping purposes). A thin
5
5
  * wrapper of individual word and the _logical_ line length (rather than the
@@ -114,7 +114,13 @@ export const wordWrapLine = (line, opts, acc = []) => {
114
114
  acc.push(new Line());
115
115
  return acc;
116
116
  }
117
- const $opts = Object.assign({ width: 80, min: 4, hard: false, splitter: SPLIT_PLAIN }, opts);
117
+ const $opts = {
118
+ width: 80,
119
+ min: 4,
120
+ hard: false,
121
+ splitter: SPLIT_PLAIN,
122
+ ...opts,
123
+ };
118
124
  for (let word of split(line, opts.delimWord || /\s/g)) {
119
125
  const curr = acc[acc.length - 1];
120
126
  wrapWord(word, $opts, curr && curr.n > 0 ? curr.n + 1 : 0, acc);
package/wrap.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Stringer } from "./api";
1
+ import type { Stringer } from "./api.js";
2
2
  /**
3
3
  * Returns a {@link Stringer} which wrap inputs with given `pad` string on
4
4
  * both sides.
package/wrap.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memoizeJ } from "@thi.ng/memoize";
1
+ import { memoizeJ } from "@thi.ng/memoize/memoizej";
2
2
  /**
3
3
  * Returns a {@link Stringer} which wrap inputs with given `pad` string on
4
4
  * both sides.