@thi.ng/strings 3.7.24 → 3.7.26

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-13T14:04:31Z
3
+ - **Last updated**: 2024-03-21T16:11:49Z
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.25](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.7.25) (2024-03-18)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - minor update slugify()/slugifyGH() regexps ([03b77d1](https://github.com/thi-ng/umbrella/commit/03b77d1))
17
+
12
18
  ### [3.7.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/strings@3.7.4) (2023-12-18)
13
19
 
14
20
  #### 🩹 Bug fixes
package/README.md CHANGED
@@ -145,7 +145,7 @@ For Node.js REPL:
145
145
  const strings = await import("@thi.ng/strings");
146
146
  ```
147
147
 
148
- Package sizes (brotli'd, pre-treeshake): ESM: 5.44 KB
148
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.43 KB
149
149
 
150
150
  ## Dependencies
151
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/strings",
3
- "version": "3.7.24",
3
+ "version": "3.7.26",
4
4
  "description": "Various string formatting & utility functions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -204,5 +204,5 @@
204
204
  "thi.ng": {
205
205
  "year": 2015
206
206
  },
207
- "gitHead": "bc0f3cb07d6f1cab6dbdc5ff57428f5484e711bb\n"
207
+ "gitHead": "da965520b2f3f8c259a791e8e8864308be2ba0be\n"
208
208
  }
package/slugify.js CHANGED
@@ -2,11 +2,11 @@ const src = "\xE0\xE1\xE4\xE2\xE3\xE5\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF2\xF3\xF
2
2
  const dest = "aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------";
3
3
  const re = new RegExp(src.split("").join("|"), "g");
4
4
  const slugify = (str) => {
5
- return str.toLowerCase().replace(/\s+/g, "-").replace(re, (c) => dest[src.indexOf(c)]).replace(/&+/g, "-and-").replace(/[^\w\-]+/g, "").replace(/\p{Emoji_Presentation}/gu, "").replace(/\-{2,}/g, "-").replace(/(^-+)|(-+$)/g, "");
5
+ return str.toLowerCase().replace(/\s+/g, "-").replace(re, (c) => dest[src.indexOf(c)]).replace(/&+/g, "-and-").replace(/[^\w-]+/g, "").replace(/\p{Emoji_Presentation}/gu, "").replace(/-{2,}/g, "-").replace(/(^-+)|(-+$)/g, "");
6
6
  };
7
7
  const slugifyGH = (str) => {
8
8
  return str.toLowerCase().replace(
9
- /[!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~\u0000-\u001f\u2000-\u206f\u2700-\u27bf\u2e00-\u2e7f]/g,
9
+ /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\u0000-\u001f\u2000-\u206f\u2700-\u27bf\u2e00-\u2e7f]/g,
10
10
  ""
11
11
  ).replace(/\p{Emoji_Presentation}/gu, "").replace(/\s/g, "-");
12
12
  };