@thi.ng/strings 3.7.27 → 3.7.29

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**: 2024-03-22T17:13:08Z
3
+ - **Last updated**: 2024-04-08T14:59:30Z
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.7.28](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.7.28) (2024-03-27)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update memoizations ([d7b188d](https://github.com/thi-ng/umbrella/commit/d7b188d))
17
+
12
18
  ### [3.7.27](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.7.27) (2024-03-22)
13
19
 
14
20
  #### 🩹 Bug fixes
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
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
  > [!NOTE]
10
- > This is one of 190 standalone projects, maintained as part
10
+ > This is one of 191 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
  >
@@ -131,7 +131,13 @@ Partially based on Clojure version of [thi.ng/strf](http://thi.ng/strf).
131
131
  yarn add @thi.ng/strings
132
132
  ```
133
133
 
134
- ES module import:
134
+ ESM import:
135
+
136
+ ```ts
137
+ import * as str from "@thi.ng/strings";
138
+ ```
139
+
140
+ Browser ESM import:
135
141
 
136
142
  ```html
137
143
  <script type="module" src="https://cdn.skypack.dev/@thi.ng/strings"></script>
@@ -142,10 +148,10 @@ ES module import:
142
148
  For Node.js REPL:
143
149
 
144
150
  ```js
145
- const strings = await import("@thi.ng/strings");
151
+ const str = await import("@thi.ng/strings");
146
152
  ```
147
153
 
148
- Package sizes (brotli'd, pre-treeshake): ESM: 5.43 KB
154
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.42 KB
149
155
 
150
156
  ## Dependencies
151
157
 
package/join.js CHANGED
@@ -1,5 +1,5 @@
1
- import { memoize1 } from "@thi.ng/memoize/memoize1";
2
- const join = memoize1(
1
+ import { memoizeO } from "@thi.ng/memoize/memoizeo";
2
+ const join = memoizeO(
3
3
  (sep) => (x) => x.join(sep)
4
4
  );
5
5
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/strings",
3
- "version": "3.7.27",
3
+ "version": "3.7.29",
4
4
  "description": "Various string formatting & utility functions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,17 +36,17 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.9.30",
40
- "@thi.ng/errors": "^2.5.1",
41
- "@thi.ng/hex": "^2.3.40",
42
- "@thi.ng/memoize": "^3.1.65"
39
+ "@thi.ng/api": "^8.10.0",
40
+ "@thi.ng/errors": "^2.5.3",
41
+ "@thi.ng/hex": "^2.3.42",
42
+ "@thi.ng/memoize": "^3.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@microsoft/api-extractor": "^7.42.3",
46
- "esbuild": "^0.20.1",
45
+ "@microsoft/api-extractor": "^7.43.0",
46
+ "esbuild": "^0.20.2",
47
47
  "rimraf": "^5.0.5",
48
48
  "typedoc": "^0.25.12",
49
- "typescript": "^5.4.2"
49
+ "typescript": "^5.4.3"
50
50
  },
51
51
  "keywords": [
52
52
  "ansi",
@@ -204,5 +204,5 @@
204
204
  "thi.ng": {
205
205
  "year": 2015
206
206
  },
207
- "gitHead": "16686bb40f7bd7a14a5d1304e353a82cb0069a1a\n"
207
+ "gitHead": "85ac4bd4d6d89f8e3689e2863d5bea0cecdb371c\n"
208
208
  }
package/trim.js CHANGED
@@ -1,5 +1,5 @@
1
- import { memoize1 } from "@thi.ng/memoize/memoize1";
2
- const trim = memoize1((chars = " \n\r") => {
1
+ import { memoizeO } from "@thi.ng/memoize/memoizeo";
2
+ const trim = memoizeO((chars = " \n\r") => {
3
3
  chars = `(${chars.split("").map((x) => `\\${x}`).join("|")})`;
4
4
  const re = new RegExp(`(^${chars}+)|(${chars}+$)`, "g");
5
5
  return (x) => x.replace(re, "");