@stryke/string-format 0.6.0 → 0.6.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.
@@ -7,6 +7,6 @@ exports.CASE_SPLIT_PATTERN = void 0;
7
7
  exports.getWords = getWords;
8
8
  const CASE_SPLIT_PATTERN = exports.CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;
9
9
  function getWords(r) {
10
- if (r.length > 2e3) throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
10
+ if (r.length > 5e3) throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
11
11
  return [...(r.match(CASE_SPLIT_PATTERN) ?? [])];
12
12
  }
@@ -1 +1 @@
1
- export const CASE_SPLIT_PATTERN=/[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;export function getWords(r){if(r.length>2e3)throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");return[...r.match(CASE_SPLIT_PATTERN)??[]]}
1
+ export const CASE_SPLIT_PATTERN=/[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;export function getWords(r){if(r.length>5e3)throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");return[...r.match(CASE_SPLIT_PATTERN)??[]]}
@@ -10,5 +10,5 @@ function isPascalCase(e) {
10
10
  return e ? /^[A-Z][a-zA-Z0-9]*$/.test(e) : !1;
11
11
  }
12
12
  function pascalCase(e) {
13
- return isPascalCase(e) || e === void 0 ? e : (0, _getWords.getWords)(e).map(r => r.length > 0 ? r.trim().charAt(0).toUpperCase() + r.trim().slice(1) : "").join("");
13
+ return e === void 0 ? e : (0, _getWords.getWords)(e).map(n => n.length > 0 ? n.trim().charAt(0).toUpperCase() + n.trim().slice(1) : "").join("");
14
14
  }
@@ -1 +1 @@
1
- import{getWords as n}from"./get-words";export function isPascalCase(e){return e?/^[A-Z][a-zA-Z0-9]*$/.test(e):!1}export function pascalCase(e){return isPascalCase(e)||e===void 0?e:n(e).map(r=>r.length>0?r.trim().charAt(0).toUpperCase()+r.trim().slice(1):"").join("")}
1
+ import{getWords as r}from"./get-words";export function isPascalCase(e){return e?/^[A-Z][a-zA-Z0-9]*$/.test(e):!1}export function pascalCase(e){return e===void 0?e:r(e).map(n=>n.length>0?n.trim().charAt(0).toUpperCase()+n.trim().slice(1):"").join("")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/string-format",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "A package containing utility functions to transform strings into various formats.",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "private": false,
12
12
  "publishConfig": { "access": "public" },
13
- "dependencies": { "@stryke/helpers": "^0.7.1", "@stryke/types": "^0.8.6" },
13
+ "dependencies": { "@stryke/helpers": "^0.7.1", "@stryke/types": "^0.8.8" },
14
14
  "devDependencies": {},
15
15
  "sideEffects": false,
16
16
  "files": ["dist/**/*"],
@@ -333,5 +333,5 @@
333
333
  "main": "./dist/index.cjs",
334
334
  "module": "./dist/index.mjs",
335
335
  "types": "./dist/index.d.ts",
336
- "gitHead": "57da58e3434302b35f798674d9f18f92ca7f7ac9"
336
+ "gitHead": "65b0557df259542217c34e7e93413b662359e3d3"
337
337
  }