@visulima/string 1.1.0 → 1.2.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +201 -2
  3. package/dist/case/camel-case.d.cts +3 -3
  4. package/dist/case/camel-case.d.mts +3 -3
  5. package/dist/case/camel-case.d.ts +3 -3
  6. package/dist/case/capital-case.d.cts +3 -3
  7. package/dist/case/capital-case.d.mts +3 -3
  8. package/dist/case/capital-case.d.ts +3 -3
  9. package/dist/case/constant-case.d.cts +3 -3
  10. package/dist/case/constant-case.d.mts +3 -3
  11. package/dist/case/constant-case.d.ts +3 -3
  12. package/dist/case/dot-case.d.cts +3 -3
  13. package/dist/case/dot-case.d.mts +3 -3
  14. package/dist/case/dot-case.d.ts +3 -3
  15. package/dist/case/flat-case.d.cts +3 -3
  16. package/dist/case/flat-case.d.mts +3 -3
  17. package/dist/case/flat-case.d.ts +3 -3
  18. package/dist/case/flip-case.d.cts +3 -3
  19. package/dist/case/flip-case.d.mts +3 -3
  20. package/dist/case/flip-case.d.ts +3 -3
  21. package/dist/case/identify-case.d.cts +3 -3
  22. package/dist/case/identify-case.d.mts +3 -3
  23. package/dist/case/identify-case.d.ts +3 -3
  24. package/dist/case/index.d.cts +3 -3
  25. package/dist/case/index.d.mts +3 -3
  26. package/dist/case/index.d.ts +3 -3
  27. package/dist/case/kebab-case.d.cts +3 -3
  28. package/dist/case/kebab-case.d.mts +3 -3
  29. package/dist/case/kebab-case.d.ts +3 -3
  30. package/dist/case/lower-first.d.cts +3 -3
  31. package/dist/case/lower-first.d.mts +3 -3
  32. package/dist/case/lower-first.d.ts +3 -3
  33. package/dist/case/no-case.d.cts +3 -3
  34. package/dist/case/no-case.d.mts +3 -3
  35. package/dist/case/no-case.d.ts +3 -3
  36. package/dist/case/pascal-case.d.cts +3 -3
  37. package/dist/case/pascal-case.d.mts +3 -3
  38. package/dist/case/pascal-case.d.ts +3 -3
  39. package/dist/case/pascal-snake-case.d.cts +3 -3
  40. package/dist/case/pascal-snake-case.d.mts +3 -3
  41. package/dist/case/pascal-snake-case.d.ts +3 -3
  42. package/dist/case/path-case.d.cts +3 -3
  43. package/dist/case/path-case.d.mts +3 -3
  44. package/dist/case/path-case.d.ts +3 -3
  45. package/dist/case/sentence-case.d.cts +3 -3
  46. package/dist/case/sentence-case.d.mts +3 -3
  47. package/dist/case/sentence-case.d.ts +3 -3
  48. package/dist/case/snake-case.d.cts +3 -3
  49. package/dist/case/snake-case.d.mts +3 -3
  50. package/dist/case/snake-case.d.ts +3 -3
  51. package/dist/case/split-by-case.d.cts +3 -3
  52. package/dist/case/split-by-case.d.mts +3 -3
  53. package/dist/case/split-by-case.d.ts +3 -3
  54. package/dist/case/title-case.d.cts +3 -3
  55. package/dist/case/title-case.d.mts +3 -3
  56. package/dist/case/title-case.d.ts +3 -3
  57. package/dist/case/train-case.d.cts +3 -3
  58. package/dist/case/train-case.d.mts +3 -3
  59. package/dist/case/train-case.d.ts +3 -3
  60. package/dist/case/upper-first.d.cts +3 -3
  61. package/dist/case/upper-first.d.mts +3 -3
  62. package/dist/case/upper-first.d.ts +3 -3
  63. package/dist/index.cjs +6 -0
  64. package/dist/index.d.cts +11 -4
  65. package/dist/index.d.mts +11 -4
  66. package/dist/index.d.ts +11 -4
  67. package/dist/index.mjs +3 -0
  68. package/dist/native-string-types.d.cts +1 -1
  69. package/dist/native-string-types.d.mts +1 -1
  70. package/dist/native-string-types.d.ts +1 -1
  71. package/dist/packem_shared/lru-cache-B_t27XwI.d.cts +14 -0
  72. package/dist/packem_shared/lru-cache-B_t27XwI.d.mts +14 -0
  73. package/dist/packem_shared/lru-cache-B_t27XwI.d.ts +14 -0
  74. package/dist/packem_shared/replaceString-C7Dp5vAg.mjs +200 -0
  75. package/dist/packem_shared/replaceString-iYo1cDfZ.cjs +202 -0
  76. package/dist/packem_shared/slugify-DhE59J2A.mjs +48 -0
  77. package/dist/packem_shared/slugify-jh6PftAT.cjs +50 -0
  78. package/dist/packem_shared/transliterate-BEci5RC8.cjs +47782 -0
  79. package/dist/packem_shared/transliterate-DwSldp0o.mjs +47780 -0
  80. package/dist/packem_shared/{types-BttWSSIk.d.ts → types-C5Pk8B8Q.d.cts} +3 -3
  81. package/dist/packem_shared/{types-BAd3WDHo.d.mts → types-DcGtApe2.d.ts} +3 -3
  82. package/dist/packem_shared/{types-BNbQJg02.d.cts → types-DmfKbIaI.d.cts} +23 -1
  83. package/dist/packem_shared/{types-BNbQJg02.d.mts → types-DmfKbIaI.d.mts} +23 -1
  84. package/dist/packem_shared/{types-BNbQJg02.d.ts → types-DmfKbIaI.d.ts} +23 -1
  85. package/dist/packem_shared/{types-D2-6p7t1.d.cts → types-_jqW_ZOt.d.mts} +3 -3
  86. package/dist/truncate.cjs +1 -0
  87. package/dist/truncate.mjs +1 -0
  88. package/dist/utils.cjs +57 -1
  89. package/dist/utils.d.cts +9 -13
  90. package/dist/utils.d.mts +9 -13
  91. package/dist/utils.d.ts +9 -13
  92. package/dist/utils.mjs +55 -0
  93. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## @visulima/string [1.2.1](https://github.com/visulima/visulima/compare/@visulima/string@1.2.0...@visulima/string@1.2.1) (2025-05-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **string:** fixed Thai transliteration support ([84aab42](https://github.com/visulima/visulima/commit/84aab427a6248725d71f475bddb45dcbf64d470e))
6
+
7
+ ## @visulima/string [1.2.0](https://github.com/visulima/visulima/compare/@visulima/string@1.1.0...@visulima/string@1.2.0) (2025-05-07)
8
+
9
+ ### Features
10
+
11
+ * added transliterate, slugify and replaceString ([#502](https://github.com/visulima/visulima/issues/502)) ([d2b1918](https://github.com/visulima/visulima/commit/d2b1918dd9ed87584ed3c05b11aceca581437c89))
12
+
1
13
  ## @visulima/string [1.1.0](https://github.com/visulima/visulima/compare/@visulima/string@1.0.5...@visulima/string@1.1.0) (2025-05-04)
2
14
 
3
15
  ### Features
package/README.md CHANGED
@@ -240,6 +240,75 @@ const customWrapped = wordWrap("Text with\u200Bzero-width characters and\u200Btr
240
240
  });
241
241
  ```
242
242
 
243
+ ### String Replacement with Ignore Ranges
244
+
245
+ The `replaceString` function provides advanced string replacement capabilities, allowing multiple search/replace operations (using strings or RegExps) while respecting specified index ranges that should be ignored. It also handles match precedence correctly (earlier start index wins, then longer match wins if starts are identical) and ensures only the highest-priority, non-overlapping, non-ignored match is applied in any given segment.
246
+
247
+ > **Note:** Use this function when you need fine-grained control over multiple replacements, especially when needing to ignore specific index ranges or handle complex overlapping matches with defined precedence rules. For simple, non-overlapping replacements without ignore ranges, native `String.prototype.replaceAll` might be sufficient.
248
+
249
+ ```typescript
250
+ import replaceString from "@visulima/string/replace-string"; // Adjust import path if needed
251
+ import type { IntervalArray, OptionReplaceArray } from "@visulima/string";
252
+
253
+ // Basic Usage
254
+ const source1 = "Replace AB and CD";
255
+ const searches1: OptionReplaceArray = [
256
+ ["AB", "ab"],
257
+ ["CD", "cd"],
258
+ ];
259
+ const result1 = replaceString(source1, searches1, []);
260
+ // result1: "Replace ab and cd"
261
+
262
+ // With Ignore Ranges
263
+ const source2 = "Replace AB and ignore CD and replace XY";
264
+ const searches2: OptionReplaceArray = [
265
+ ["AB", "ab"],
266
+ ["CD", "cd"], // This should be ignored by the range
267
+ ["XY", "xy"],
268
+ ];
269
+ // Ignore indices 19-20 (targets "re" in "ignore")
270
+ const ignoreRanges2: IntervalArray = [[19, 20]];
271
+ const result2 = replaceString(source2, searches2, ignoreRanges2);
272
+ // result2: "Replace ab and ignore cd and replace xy"
273
+ // Note: "CD" is replaced because it doesn't overlap the ignore range [19, 20].
274
+
275
+ // With Overlapping Matches (Longer match takes precedence)
276
+ const source3 = "abcde";
277
+ const searches3: OptionReplaceArray = [
278
+ ["abc", "123"], // Lower precedence
279
+ ["abcde", "54321"], // Higher precedence (longer)
280
+ ];
281
+ const result3 = replaceString(source3, searches3, []);
282
+ // result3: "54321"
283
+
284
+ // With Overlapping Matches (Earlier start index takes precedence)
285
+ const source4 = "ababab";
286
+ const searches4: OptionReplaceArray = [
287
+ ["aba", "X"], // Starts at 0
288
+ ["bab", "Y"], // Starts at 1
289
+ ];
290
+ const result4 = replaceString(source4, searches4, []);
291
+ // result4: "Xbab" (Applies "X" at 0, which covers indices 0-2. Skips "Y" at 1. Appends rest.)
292
+
293
+ // With Zero-Length Matches (e.g., inserting before each char)
294
+ const source5 = "abc";
295
+ const searches5: OptionReplaceArray = [[/(?=.)/g, "^"]]; // Lookahead for position before char
296
+ const result5 = replaceString(source5, searches5, []);
297
+ // result5: "^a^b^c"
298
+
299
+ // Zero-Length Match at End
300
+ const source6 = "abc";
301
+ const searches6: OptionReplaceArray = [[/$/g, "$"]]; // Matches end of string
302
+ const result6 = replaceString(source6, searches6, []);
303
+ // result6: "abc$"
304
+
305
+ // Using $& and $n replacements
306
+ const source7 = "Firstname Lastname";
307
+ const searches7: OptionReplaceArray = [[/(\w+)\s+(\w+)/, "$2, $1 ($& - Group 1: $1)"]];
308
+ const result7 = replaceString(source7, searches7, []);
309
+ // result7: "Lastname, Firstname (Firstname Lastname - Group 1: Firstname)"
310
+ ```
311
+
243
312
  ### String Splitting
244
313
 
245
314
  The `splitByCase` function is a powerful utility that splits strings based on various patterns:
@@ -838,6 +907,131 @@ The custom matcher provides detailed error messages when tests fail, showing:
838
907
  - Whether the visible content matches but the colors differ
839
908
  - Length information for both strings
840
909
 
910
+ ### `replaceString(source, searches, ignoreRanges?)`
911
+
912
+ Replaces occurrences of search patterns within a string, respecting ignored ranges.
913
+ This function is designed to handle overlapping matches and ignore ranges correctly.
914
+ It prioritizes matches that start earlier and, for matches starting at the same position,
915
+ prefers longer matches. Replacements within ignored ranges are skipped.
916
+
917
+ **Parameters:**
918
+
919
+ - `source`: The input string.
920
+ - `searches`: An array of search pairs. Each pair can be:
921
+ - `[string | RegExp, string]`: A literal string or regex to search for, and its replacement string.
922
+ Regex flags like `g` (global) are respected.
923
+ - `ignoreRanges?`: Optional. An array of `[start, end]` index pairs (inclusive) specifying ranges within the
924
+ `source` string that should be ignored during replacement.
925
+
926
+ **Returns:**
927
+
928
+ - `string`: The string with replacements applied, respecting ignore ranges.
929
+
930
+ **Usage:**
931
+
932
+ ```typescript
933
+ import { replaceString } from "@visulima/string";
934
+
935
+ const text = "abc abc abc";
936
+ const searches = [
937
+ [/a/g, "X"],
938
+ ["abc", "YYY"],
939
+ ];
940
+ const ignoreRanges = [[4, 6]]; // Ignore the second "abc"
941
+
942
+ const result = replaceString(text, searches, ignoreRanges);
943
+ // result will be: "YYY abc YYY"
944
+ // First 'abc' is replaced by 'YYY' (longer match takes precedence over 'X').
945
+ // Second 'abc' is ignored.
946
+ // Third 'abc' is replaced by 'YYY'.
947
+ ```
948
+
949
+ ### `transliterate(source, options?)`
950
+
951
+ Performs transliteration of characters in a string based on an extensive character map and provided options. This function is useful for converting characters from one script to another (e.g., Latin with diacritics to basic Latin, Cyrillic to Latin) or for custom character replacements.
952
+
953
+ **Parameters:**
954
+
955
+ - `source: string`: The input string to transliterate.
956
+ - `options?`: Optional `OptionsTransliterate` object:
957
+ - `fixChineseSpacing?: boolean`: If `true`, adds a space between transliterated Chinese Pinyin syllables. (Default: `true`).
958
+ - `ignore?: string[]`: An array of strings or characters to ignore during transliteration. These segments will be preserved in their original form. (Default: `[]`).
959
+ - `replaceBefore?: Array<[string | RegExp, string]> | Record<string, string>`: Custom replacement rules to apply _before_ the main character map transliteration. (Default: `[]`).
960
+ - `replaceAfter?: Array<[string | RegExp, string]> | Record<string, string>`: Custom replacement rules to apply _after_ the main character map transliteration. (Default: `[]`).
961
+ - `trim?: boolean`: If `true`, trims whitespace from the beginning and end of the result. (Default: `false`).
962
+ - `unknown?: string`: The character or string to use for characters that are not found in the character map and are not covered by other rules. (Default: `""` - removes unknown characters).
963
+
964
+ **Returns:**
965
+
966
+ - `string`: The transliterated string.
967
+
968
+ **Usage:**
969
+
970
+ ```typescript
971
+ import { transliterate } from "@visulima/string"; // Assuming named export from package root
972
+
973
+ // Basic transliteration
974
+ transliterate("Crème brûlée"); // Expected: 'Creme brulee'
975
+ transliterate("你好世界"); // Expected: 'Ni Hao Shi Jie' (due to fixChineseSpacing: true)
976
+ transliterate("你好世界", { fixChineseSpacing: false }); // Expected: 'NiHaoShiJie'
977
+
978
+ // Using ignore
979
+ transliterate("Don't change THIS, but change that.", { ignore: ["THIS"] });
980
+ // Expected: 'Dont change THIS, but change that.'
981
+
982
+ // Using replaceBefore
983
+ transliterate("Replace C++ before map.", { replaceBefore: { "C++": "cpp" } });
984
+ // Expected: 'Replace cpp before map.'
985
+
986
+ // Using replaceAfter
987
+ // Example: charmap turns é -> e, then replaceAfter turns e -> E
988
+ transliterate("café", { replaceAfter: { e: "E" } });
989
+ // Expected: 'cafE'
990
+
991
+ // Handling unknown characters
992
+ transliterate("a🚀b", { unknown: "[?]" }); // Expected: 'a[?]b'
993
+ ```
994
+
995
+ ### `slugify(input, options?)`
996
+
997
+ Converts a string into a URL-friendly slug.
998
+
999
+ It transliterates non-ASCII characters using the `transliterate` function (if enabled), optionally converts case, removes disallowed characters (replacing with separator), and collapses separators.
1000
+
1001
+ **Parameters:**
1002
+
1003
+ - `input`: The string to convert.
1004
+ - `options?`: Optional `SlugifyOptions` object:
1005
+ - `allowedChars?: string`: Characters allowed in the slug. Others are replaced by `separator`. (Default: `"a-zA-Z0-9-_.~"`)
1006
+ - `fixChineseSpacing?: boolean`: Passed to `transliterate`. Determines if a space is added between transliterated Chinese characters (default: `true`).
1007
+ - `ignore?: string[]`: Passed to `transliterate`. Characters/strings to ignore during the initial transliteration phase (default: `[]`).
1008
+ - `lowercase?: boolean`: Convert to lowercase. (Default: `true`). Cannot be true if `uppercase` is true.
1009
+ - `replaceAfter?: OptionReplaceCombined`: Passed to `transliterate`. Search/replace pairs to apply _after_ the character map transliteration but _before_ slugification logic (default: `[]`).
1010
+ - `replaceBefore?: OptionReplaceCombined`: Passed to `transliterate`. Search/replace pairs to apply _before_ any transliteration (default: `[]`).
1011
+ - `separator?: string`: Custom separator. (Default: `"-"`).
1012
+ - `transliterate?: boolean`: Whether to perform the initial transliteration of non-ASCII characters. If `false`, only case conversion and character filtering/replacement are performed on the input string. (Default: `true`).
1013
+ - `unknown?: string`: Passed to `transliterate`. Character to use for unknown characters during transliteration (default: `""`).
1014
+ - `uppercase?: boolean`: Convert to uppercase. (Default: `false`). Cannot be true if `lowercase` is true.
1015
+
1016
+ **Returns:**
1017
+
1018
+ - `string`: The generated slug.
1019
+
1020
+ **Usage:**
1021
+
1022
+ ```typescript
1023
+ import { slugify } from "@visulima/string";
1024
+
1025
+ slugify("你好 World!"); // 'ni-hao-world' (fixChineseSpacing=true by default)
1026
+ slugify("你好World!", { fixChineseSpacing: false }); // 'nihaoworld'
1027
+ slugify("Crème Brûlée"); // 'creme-brulee'
1028
+ slugify("foo & bar * baz"); // 'foo-bar-baz' (&, *, space are disallowed)
1029
+ slugify("FOO BAR", { lowercase: false, uppercase: true }); // 'FOO-BAR'
1030
+ slugify("foo bar baz", { separator: "_", allowedChars: "a-z_" }); // 'foo_bar_baz'
1031
+ slugify("Keep C++", { replaceBefore: { "C++": "cpp" } }); // 'keep-cpp'
1032
+ slugify("Keep !@#$", { allowedChars: "a-z!@$" }); // 'keep!@$'
1033
+ ```
1034
+
841
1035
  ## Related
842
1036
 
843
1037
  - [change-case](https://github.com/blakeembrey/change-case) - Simple string case utilities
@@ -850,11 +1044,16 @@ The custom matcher provides detailed error messages when tests fail, showing:
850
1044
  - [fast-string-truncated-width](https://github.com/fabiospampinato/fast-string-truncated-width) - Fast string truncated width
851
1045
  - [ansi-truncate](https://github.com/fabiospampinato/ansi-truncate) - Truncate strings with ANSI escape codes
852
1046
  - [string-ts](https://github.com/gustavoguichard/string-ts) - Strongly typed string functions
1047
+ - [@sindresorhus/slugify](https://github.com/sindresorhus/slugify) - Slugify a string
1048
+ - [slugify](https://github.com/simov/slugify) - Slugify a string
1049
+ - [@sindresorhus/transliterate](https://github.com/sindresorhus/transliterate) - Convert Unicode characters to Latin characters using transliteration
1050
+ - [transliteration](https://github.com/yf-hk/transliteration/tree/main) - UTF-8 to ASCII transliteration / slugify module for node.js, browser, Web Worker, React Native, Electron and CLI.
1051
+ - [unidecode](https://github.com/FGRibreau/node-unidecode) - 📃 ASCII transliterations of Unicode text
853
1052
 
854
1053
  ## Supported Node.js Versions
855
1054
 
856
- Libraries in this ecosystem make the best effort to track [Node.js’ release schedule](https://github.com/nodejs/release#release-schedule).
857
- Here’s [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
1055
+ Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
1056
+ Here's [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
858
1057
 
859
1058
  ## Contributing
860
1059
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, C as CamelCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, a as CamelCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const camelCase: <T extends string = string>(value?: T, options?: CaseOptions) => CamelCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, C as CamelCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, a as CamelCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const camelCase: <T extends string = string>(value?: T, options?: CaseOptions) => CamelCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, C as CamelCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, a as CamelCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const camelCase: <T extends string = string>(value?: T, options?: CaseOptions) => CamelCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, a as CapitalCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, b as CapitalCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const capitalCase: <T extends string = string>(value?: T, options?: CaseOptions) => CapitalCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, a as CapitalCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, b as CapitalCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const capitalCase: <T extends string = string>(value?: T, options?: CaseOptions) => CapitalCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, a as CapitalCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, b as CapitalCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const capitalCase: <T extends string = string>(value?: T, options?: CaseOptions) => CapitalCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, c as ConstantCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, c as ConstantCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const constantCase: <T extends string = string>(value?: T, options?: CaseOptions) => ConstantCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, c as ConstantCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, c as ConstantCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const constantCase: <T extends string = string>(value?: T, options?: CaseOptions) => ConstantCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, c as ConstantCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, c as ConstantCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const constantCase: <T extends string = string>(value?: T, options?: CaseOptions) => ConstantCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, D as DotCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, D as DotCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const dotCase: <T extends string = string>(value?: T, options?: CaseOptions) => DotCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, D as DotCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, D as DotCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const dotCase: <T extends string = string>(value?: T, options?: CaseOptions) => DotCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, D as DotCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, D as DotCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const dotCase: <T extends string = string>(value?: T, options?: CaseOptions) => DotCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, F as FlatCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, F as FlatCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const flatCase: <T extends string = string>(value?: T, options?: CaseOptions) => FlatCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, F as FlatCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, F as FlatCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const flatCase: <T extends string = string>(value?: T, options?: CaseOptions) => FlatCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, F as FlatCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, F as FlatCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const flatCase: <T extends string = string>(value?: T, options?: CaseOptions) => FlatCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, d as FlipCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, d as FlipCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  type FlipOptions = Omit<CaseOptions, "handleEmoji">;
6
6
  declare const flipCase: <T extends string = string>(value?: T, options?: FlipOptions) => FlipCase<T>;
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, d as FlipCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, d as FlipCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  type FlipOptions = Omit<CaseOptions, "handleEmoji">;
6
6
  declare const flipCase: <T extends string = string>(value?: T, options?: FlipOptions) => FlipCase<T>;
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, d as FlipCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, d as FlipCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  type FlipOptions = Omit<CaseOptions, "handleEmoji">;
6
6
  declare const flipCase: <T extends string = string>(value?: T, options?: FlipOptions) => FlipCase<T>;
@@ -1,6 +1,6 @@
1
- import { I as IdentifyCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { I as IdentifyCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const identifyCase: <T extends string = string>(value?: T) => IdentifyCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { I as IdentifyCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { I as IdentifyCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const identifyCase: <T extends string = string>(value?: T) => IdentifyCase<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { I as IdentifyCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { I as IdentifyCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const identifyCase: <T extends string = string>(value?: T) => IdentifyCase<T>;
6
6
 
@@ -1,4 +1,4 @@
1
- export { N as NodeLocale } from '../packem_shared/types-BNbQJg02.cjs';
1
+ export { N as NodeLocale } from '../packem_shared/types-DmfKbIaI.cjs';
2
2
  export { default as camelCase } from './camel-case.cjs';
3
3
  export { default as capitalCase } from './capital-case.cjs';
4
4
  export { default as constantCase } from './constant-case.cjs';
@@ -17,9 +17,9 @@ export { default as snakeCase } from './snake-case.cjs';
17
17
  export { SplitOptions, splitByCase } from './split-by-case.cjs';
18
18
  export { default as titleCase } from './title-case.cjs';
19
19
  export { default as trainCase } from './train-case.cjs';
20
- export { C as CamelCase, a as CapitalCase, b as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-D2-6p7t1.cjs';
20
+ export { a as CamelCase, b as CapitalCase, C as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-C5Pk8B8Q.cjs';
21
21
  export { default as upperFirst } from './upper-first.cjs';
22
- import '../utils.cjs';
22
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
23
23
 
24
24
  declare const joinSegments: <T extends string = string>(segments: string[], joiner: string) => T;
25
25
 
@@ -1,4 +1,4 @@
1
- export { N as NodeLocale } from '../packem_shared/types-BNbQJg02.mjs';
1
+ export { N as NodeLocale } from '../packem_shared/types-DmfKbIaI.mjs';
2
2
  export { default as camelCase } from './camel-case.mjs';
3
3
  export { default as capitalCase } from './capital-case.mjs';
4
4
  export { default as constantCase } from './constant-case.mjs';
@@ -17,9 +17,9 @@ export { default as snakeCase } from './snake-case.mjs';
17
17
  export { SplitOptions, splitByCase } from './split-by-case.mjs';
18
18
  export { default as titleCase } from './title-case.mjs';
19
19
  export { default as trainCase } from './train-case.mjs';
20
- export { C as CamelCase, a as CapitalCase, b as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-BAd3WDHo.mjs';
20
+ export { a as CamelCase, b as CapitalCase, C as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-_jqW_ZOt.mjs';
21
21
  export { default as upperFirst } from './upper-first.mjs';
22
- import '../utils.mjs';
22
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
23
23
 
24
24
  declare const joinSegments: <T extends string = string>(segments: string[], joiner: string) => T;
25
25
 
@@ -1,4 +1,4 @@
1
- export { N as NodeLocale } from '../packem_shared/types-BNbQJg02.js';
1
+ export { N as NodeLocale } from '../packem_shared/types-DmfKbIaI.js';
2
2
  export { default as camelCase } from './camel-case.js';
3
3
  export { default as capitalCase } from './capital-case.js';
4
4
  export { default as constantCase } from './constant-case.js';
@@ -17,9 +17,9 @@ export { default as snakeCase } from './snake-case.js';
17
17
  export { SplitOptions, splitByCase } from './split-by-case.js';
18
18
  export { default as titleCase } from './title-case.js';
19
19
  export { default as trainCase } from './train-case.js';
20
- export { C as CamelCase, a as CapitalCase, b as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-BttWSSIk.js';
20
+ export { a as CamelCase, b as CapitalCase, C as CaseOptions, c as ConstantCase, D as DotCase, F as FlatCase, d as FlipCase, I as IdentifyCase, K as KebabCase, L as LocaleOptions, e as LowerFirst, N as NoCase, P as PascalCase, f as PascalSnakeCase, g as PathCase, S as SentenceCase, h as SnakeCase, i as SplitByCase, T as TitleCase, j as TrainCase, U as UpperFirst } from '../packem_shared/types-DcGtApe2.js';
21
21
  export { default as upperFirst } from './upper-first.js';
22
- import '../utils.js';
22
+ import '../packem_shared/lru-cache-B_t27XwI.js';
23
23
 
24
24
  declare const joinSegments: <T extends string = string>(segments: string[], joiner: string) => T;
25
25
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, K as KebabCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, K as KebabCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  interface KebabCaseOptions extends CaseOptions {
6
6
  joiner?: string;
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, K as KebabCase } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { C as CaseOptions, K as KebabCase } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  interface KebabCaseOptions extends CaseOptions {
6
6
  joiner?: string;
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, K as KebabCase } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { C as CaseOptions, K as KebabCase } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  interface KebabCaseOptions extends CaseOptions {
6
6
  joiner?: string;
@@ -1,6 +1,6 @@
1
- import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const lowerFirst: <T extends string = string>(value?: T, options?: LocaleOptions) => LowerFirst<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-BAd3WDHo.mjs';
2
- import '../packem_shared/types-BNbQJg02.mjs';
3
- import '../utils.mjs';
1
+ import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-_jqW_ZOt.mjs';
2
+ import '../packem_shared/types-DmfKbIaI.mjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.mjs';
4
4
 
5
5
  declare const lowerFirst: <T extends string = string>(value?: T, options?: LocaleOptions) => LowerFirst<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-BttWSSIk.js';
2
- import '../packem_shared/types-BNbQJg02.js';
3
- import '../utils.js';
1
+ import { L as LocaleOptions, e as LowerFirst } from '../packem_shared/types-DcGtApe2.js';
2
+ import '../packem_shared/types-DmfKbIaI.js';
3
+ import '../packem_shared/lru-cache-B_t27XwI.js';
4
4
 
5
5
  declare const lowerFirst: <T extends string = string>(value?: T, options?: LocaleOptions) => LowerFirst<T>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as CaseOptions, N as NoCase } from '../packem_shared/types-D2-6p7t1.cjs';
2
- import '../packem_shared/types-BNbQJg02.cjs';
3
- import '../utils.cjs';
1
+ import { C as CaseOptions, N as NoCase } from '../packem_shared/types-C5Pk8B8Q.cjs';
2
+ import '../packem_shared/types-DmfKbIaI.cjs';
3
+ import '../packem_shared/lru-cache-B_t27XwI.cjs';
4
4
 
5
5
  declare const noCase: <T extends string = string>(value?: T, options?: CaseOptions) => NoCase<T>;
6
6