@ppabari/strio 1.0.2 → 1.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/dist/str.cjs ADDED
@@ -0,0 +1,623 @@
1
+ 'use strict';
2
+
3
+ // src/str/internal.ts
4
+ function assertString(value, name = "input") {
5
+ if (typeof value !== "string") {
6
+ throw new TypeError(`Expected ${name} to be a string, received ${typeof value}.`);
7
+ }
8
+ }
9
+ function extractWords(str) {
10
+ return str.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/([a-zA-Z])([0-9])/g, "$1 $2").replace(/([0-9])([a-zA-Z])/g, "$1 $2").split(/[^a-zA-Z0-9]+/).filter(Boolean);
11
+ }
12
+
13
+ // src/str/manipulation.ts
14
+ function capitalize(str, lowerRest = false) {
15
+ assertString(str);
16
+ if (str.length === 0) return str;
17
+ const rest = lowerRest ? str.slice(1).toLowerCase() : str.slice(1);
18
+ return str.charAt(0).toUpperCase() + rest;
19
+ }
20
+ function capitalizeWords(str) {
21
+ assertString(str);
22
+ return str.replace(/(^|\s)(\S)/g, (_m, lead, ch) => lead + ch.toUpperCase());
23
+ }
24
+ function reverse(str) {
25
+ assertString(str);
26
+ return [...str].reverse().join("");
27
+ }
28
+ function truncate(str, length, suffix = "\u2026") {
29
+ assertString(str);
30
+ if (str.length <= length) return str;
31
+ if (length <= suffix.length) return suffix.slice(0, length);
32
+ return str.slice(0, length - suffix.length) + suffix;
33
+ }
34
+ function truncateWords(str, count2, suffix = "\u2026") {
35
+ assertString(str);
36
+ const parts = str.trim().split(/\s+/).filter(Boolean);
37
+ if (count2 <= 0) return suffix;
38
+ if (parts.length <= count2) return str;
39
+ return parts.slice(0, count2).join(" ") + suffix;
40
+ }
41
+ function trim(str, chars) {
42
+ assertString(str);
43
+ if (chars === void 0) return str.trim();
44
+ if (chars.length === 0) return str;
45
+ const set = new Set(chars);
46
+ let start = 0;
47
+ let end = str.length;
48
+ while (start < end && set.has(str[start])) start++;
49
+ while (end > start && set.has(str[end - 1])) end--;
50
+ return str.slice(start, end);
51
+ }
52
+ function insert(str, index, substring) {
53
+ assertString(str);
54
+ assertString(substring, "substring");
55
+ let i = index < 0 ? str.length + index : index;
56
+ if (i < 0) i = 0;
57
+ if (i > str.length) i = str.length;
58
+ return str.slice(0, i) + substring + str.slice(i);
59
+ }
60
+ function mask(str, options = {}) {
61
+ assertString(str);
62
+ const { maskChar = "*", visibleStart = 0, visibleEnd = 0 } = options;
63
+ const chars = [...str];
64
+ const len = chars.length;
65
+ if (visibleStart + visibleEnd >= len) return str;
66
+ const head = chars.slice(0, Math.max(0, visibleStart)).join("");
67
+ const tail = visibleEnd > 0 ? chars.slice(len - visibleEnd).join("") : "";
68
+ const maskedCount = len - Math.max(0, visibleStart) - Math.max(0, visibleEnd);
69
+ return head + maskChar.repeat(maskedCount) + tail;
70
+ }
71
+
72
+ // src/str/case.ts
73
+ function camelize(str) {
74
+ assertString(str);
75
+ const words2 = extractWords(str);
76
+ if (words2.length === 0) return "";
77
+ return words2.map(
78
+ (w, i) => i === 0 ? w.toLowerCase() : w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()
79
+ ).join("");
80
+ }
81
+ function pascalize(str) {
82
+ assertString(str);
83
+ return extractWords(str).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join("");
84
+ }
85
+ function dasherize(str) {
86
+ assertString(str);
87
+ return extractWords(str).map((w) => w.toLowerCase()).join("-");
88
+ }
89
+ function underscore(str) {
90
+ assertString(str);
91
+ return extractWords(str).map((w) => w.toLowerCase()).join("_");
92
+ }
93
+
94
+ // src/str/validation.ts
95
+ function isString(value) {
96
+ return typeof value === "string";
97
+ }
98
+ function isEmpty(value) {
99
+ return !isString(value) || value.length === 0;
100
+ }
101
+ function isBlank(value) {
102
+ return !isString(value) || value.trim().length === 0;
103
+ }
104
+ function isAlpha(value) {
105
+ return isString(value) && /^[A-Za-z]+$/.test(value);
106
+ }
107
+ function isNumeric(value) {
108
+ return isString(value) && /^[0-9]+$/.test(value);
109
+ }
110
+ function isAlphaNumeric(value) {
111
+ return isString(value) && /^[A-Za-z0-9]+$/.test(value);
112
+ }
113
+ function isUpperCase(value) {
114
+ return isString(value) && /[A-Z]/.test(value) && value === value.toUpperCase();
115
+ }
116
+ function isLowerCase(value) {
117
+ return isString(value) && /[a-z]/.test(value) && value === value.toLowerCase();
118
+ }
119
+
120
+ // src/str/searching.ts
121
+ function normalize(s, caseSensitive) {
122
+ return caseSensitive ? s : s.toLowerCase();
123
+ }
124
+ function contains(str, substring, caseSensitive = true) {
125
+ assertString(str);
126
+ assertString(substring, "substring");
127
+ return normalize(str, caseSensitive).includes(normalize(substring, caseSensitive));
128
+ }
129
+ function containsAll(str, substrings, caseSensitive = true) {
130
+ assertString(str);
131
+ return substrings.every((s) => contains(str, s, caseSensitive));
132
+ }
133
+ function containsAny(str, substrings, caseSensitive = true) {
134
+ assertString(str);
135
+ return substrings.some((s) => contains(str, s, caseSensitive));
136
+ }
137
+ function count(str, substring, overlapping = false) {
138
+ assertString(str);
139
+ assertString(substring, "substring");
140
+ if (substring.length === 0) return 0;
141
+ let n = 0;
142
+ let pos = 0;
143
+ const step = overlapping ? 1 : substring.length;
144
+ while ((pos = str.indexOf(substring, pos)) !== -1) {
145
+ n++;
146
+ pos += step;
147
+ }
148
+ return n;
149
+ }
150
+ function between(str, start, end) {
151
+ assertString(str);
152
+ const startIdx = str.indexOf(start);
153
+ if (startIdx === -1) return "";
154
+ const from = startIdx + start.length;
155
+ const endIdx = str.indexOf(end, from);
156
+ if (endIdx === -1) return "";
157
+ return str.slice(from, endIdx);
158
+ }
159
+ function betweenAll(str, start, end) {
160
+ assertString(str);
161
+ const results = [];
162
+ let pos = 0;
163
+ while (true) {
164
+ const startIdx = str.indexOf(start, pos);
165
+ if (startIdx === -1) break;
166
+ const from = startIdx + start.length;
167
+ const endIdx = str.indexOf(end, from);
168
+ if (endIdx === -1) break;
169
+ results.push(str.slice(from, endIdx));
170
+ pos = endIdx + end.length;
171
+ }
172
+ return results;
173
+ }
174
+
175
+ // src/core.ts
176
+ function getRandomChars(charset, count2) {
177
+ const len = charset.length;
178
+ const maxValid = 256 - 256 % len;
179
+ const result = [];
180
+ const bufSize = Math.ceil(count2 * 1.4) + 32;
181
+ const buf = new Uint8Array(bufSize);
182
+ while (result.length < count2) {
183
+ crypto.getRandomValues(buf);
184
+ for (let i = 0; i < buf.length && result.length < count2; i++) {
185
+ const byte = buf[i];
186
+ if (byte < maxValid) {
187
+ result.push(charset[byte % len]);
188
+ }
189
+ }
190
+ }
191
+ return result;
192
+ }
193
+
194
+ // src/charset-aliases.ts
195
+ var CHARSET_ALIASES = {
196
+ /**
197
+ * Base16 — hex digits, lowercase.
198
+ * Use for: hash representations, color codes, compact binary encoding.
199
+ */
200
+ base16: "0123456789abcdef",
201
+ /** Base16 uppercase variant */
202
+ base16upper: "0123456789ABCDEF",
203
+ /**
204
+ * Base32 — RFC 4648. Uppercase alpha + digits, no padding chars.
205
+ * Use for: case-insensitive tokens, OTP secrets (Google Authenticator compatible).
206
+ */
207
+ base32: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
208
+ /**
209
+ * Base32 hex — RFC 4648 §7. Sortable alternative to standard base32.
210
+ */
211
+ base32hex: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
212
+ /**
213
+ * Base36 — digits + lowercase alpha.
214
+ * Use for: short URLs, case-insensitive IDs, number system conversions.
215
+ */
216
+ base36: "0123456789abcdefghijklmnopqrstuvwxyz",
217
+ /**
218
+ * Base58 — Bitcoin alphabet. No 0/O/I/l to avoid visual ambiguity.
219
+ * Use for: Bitcoin addresses, IPFS CIDs, human-readable tokens.
220
+ */
221
+ base58: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
222
+ /**
223
+ * Base62 — digits + lowercase + uppercase. Max density for alphanumeric.
224
+ * Use for: URL shorteners, compact IDs, high-entropy tokens.
225
+ */
226
+ base62: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
227
+ /**
228
+ * Base64 URL-safe — RFC 4648 §5. No +/= padding; URL and filename safe.
229
+ * Use for: JWT components, URL tokens, file names.
230
+ */
231
+ base64url: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_",
232
+ /**
233
+ * Alphanumeric — same as base62. Alias for clarity.
234
+ */
235
+ alphanumeric: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
236
+ /**
237
+ * Alpha — letters only, mixed case.
238
+ */
239
+ alpha: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
240
+ /**
241
+ * Numeric — digits only.
242
+ */
243
+ numeric: "0123456789",
244
+ /**
245
+ * Hex — alias for base16 lowercase.
246
+ */
247
+ hex: "0123456789abcdef",
248
+ /**
249
+ * Crockford Base32 — human-friendly, case-insensitive, excludes I/L/O/U.
250
+ * Use for: serial numbers, redemption codes, user-facing IDs.
251
+ */
252
+ crockford32: "0123456789ABCDEFGHJKMNPQRSTVWXYZ"
253
+ };
254
+ function resolveCharsetAlias(value) {
255
+ return CHARSET_ALIASES[value] ?? value;
256
+ }
257
+
258
+ // src/str/utilities.ts
259
+ function words(str) {
260
+ assertString(str);
261
+ return str.match(/[A-Za-z0-9]+/g) ?? [];
262
+ }
263
+ function wordCount(str) {
264
+ return words(str).length;
265
+ }
266
+ function join(values, separator = " ") {
267
+ return values.filter((v) => v !== null && v !== void 0 && v !== "").join(separator);
268
+ }
269
+ function template(str, data, options = {}) {
270
+ assertString(str);
271
+ const { fallback } = options;
272
+ return str.replace(/\{\{\s*([\w.$-]+)\s*\}\}/g, (match, key) => {
273
+ const value = data[key];
274
+ if (value === void 0 || value === null) {
275
+ return fallback !== void 0 ? fallback : match;
276
+ }
277
+ return String(value);
278
+ });
279
+ }
280
+ function random(length, charset = "alphanumeric") {
281
+ if (!Number.isInteger(length) || length < 0) {
282
+ throw new RangeError(`length must be a non-negative integer, received ${length}.`);
283
+ }
284
+ const pool = resolveCharsetAlias(charset);
285
+ if (pool.length < 2) {
286
+ throw new RangeError("charset must contain at least 2 distinct characters.");
287
+ }
288
+ if (length === 0) return "";
289
+ return getRandomChars(pool, length).join("");
290
+ }
291
+ function randomAlpha(length) {
292
+ return random(length, CHARSET_ALIASES.alpha);
293
+ }
294
+ function randomNumeric(length) {
295
+ return random(length, CHARSET_ALIASES.numeric);
296
+ }
297
+ function randomAlphanumeric(length) {
298
+ return random(length, CHARSET_ALIASES.alphanumeric);
299
+ }
300
+ function similarity(a, b) {
301
+ assertString(a, "a");
302
+ assertString(b, "b");
303
+ if (a === b) return 1;
304
+ const maxLen = Math.max(a.length, b.length);
305
+ if (maxLen === 0) return 1;
306
+ return 1 - levenshtein(a, b) / maxLen;
307
+ }
308
+ function levenshtein(a, b) {
309
+ if (a.length === 0) return b.length;
310
+ if (b.length === 0) return a.length;
311
+ let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
312
+ const curr = new Array(b.length + 1);
313
+ for (let i = 1; i <= a.length; i++) {
314
+ curr[0] = i;
315
+ for (let j = 1; j <= b.length; j++) {
316
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
317
+ curr[j] = Math.min(curr[j - 1] + 1, prev[j] + 1, prev[j - 1] + cost);
318
+ }
319
+ prev = curr.slice();
320
+ }
321
+ return prev[b.length];
322
+ }
323
+ var TRANSLITERATION_MAP = {
324
+ "\xDF": "ss",
325
+ // ß
326
+ "\xE6": "ae",
327
+ // æ
328
+ "\xC6": "AE",
329
+ // Æ
330
+ "\u0153": "oe",
331
+ // œ
332
+ "\u0152": "OE",
333
+ // Œ
334
+ "\xF8": "o",
335
+ // ø
336
+ "\xD8": "O",
337
+ // Ø
338
+ "\u0111": "d",
339
+ // đ
340
+ "\u0110": "D",
341
+ // Đ
342
+ "\xF0": "d",
343
+ // ð
344
+ "\xD0": "D",
345
+ // Ð
346
+ "\xFE": "th",
347
+ // þ
348
+ "\xDE": "Th",
349
+ // Þ
350
+ "\u0142": "l",
351
+ // ł
352
+ "\u0141": "L"
353
+ // Ł
354
+ };
355
+ function transliterate(str) {
356
+ assertString(str);
357
+ const mapped = [...str].map((ch) => TRANSLITERATION_MAP[ch] ?? ch).join("");
358
+ return mapped.normalize("NFKD").replace(/[̀-ͯ]/g, "");
359
+ }
360
+
361
+ // src/str/formatting.ts
362
+ function humanize(str) {
363
+ assertString(str);
364
+ const words2 = extractWords(str).map((w) => w.toLowerCase());
365
+ if (words2.length === 0) return "";
366
+ const [first, ...rest] = words2;
367
+ return [first.charAt(0).toUpperCase() + first.slice(1), ...rest].join(" ");
368
+ }
369
+ var TITLE_MINOR_WORDS = /* @__PURE__ */ new Set([
370
+ "a",
371
+ "an",
372
+ "and",
373
+ "as",
374
+ "at",
375
+ "but",
376
+ "by",
377
+ "for",
378
+ "if",
379
+ "in",
380
+ "nor",
381
+ "of",
382
+ "on",
383
+ "or",
384
+ "per",
385
+ "the",
386
+ "to",
387
+ "via",
388
+ "vs"
389
+ ]);
390
+ function titleCase(str) {
391
+ assertString(str);
392
+ const words2 = str.trim().split(/\s+/).filter(Boolean);
393
+ const last = words2.length - 1;
394
+ return words2.map((word, i) => {
395
+ const lower = word.toLowerCase();
396
+ if (i !== 0 && i !== last && TITLE_MINOR_WORDS.has(lower)) return lower;
397
+ return lower.charAt(0).toUpperCase() + lower.slice(1);
398
+ }).join(" ");
399
+ }
400
+ function slugify(str, separator = "-") {
401
+ assertString(str);
402
+ return transliterate(str).toLowerCase().replace(/[^a-z0-9]+/g, separator).replace(new RegExp(`^${escapeSep(separator)}+|${escapeSep(separator)}+$`, "g"), "");
403
+ }
404
+ function escapeSep(sep) {
405
+ return sep.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
406
+ }
407
+ function ordinalize(n) {
408
+ const num = typeof n === "number" ? n : parseInt(n, 10);
409
+ if (!Number.isFinite(num)) throw new TypeError(`Expected a finite number, received ${n}.`);
410
+ const abs = Math.abs(num) % 100;
411
+ let suffix = "th";
412
+ if (abs < 11 || abs > 13) {
413
+ switch (abs % 10) {
414
+ case 1:
415
+ suffix = "st";
416
+ break;
417
+ case 2:
418
+ suffix = "nd";
419
+ break;
420
+ case 3:
421
+ suffix = "rd";
422
+ break;
423
+ }
424
+ }
425
+ return `${num}${suffix}`;
426
+ }
427
+ var IRREGULAR_PLURALS = {
428
+ child: "children",
429
+ person: "people",
430
+ man: "men",
431
+ woman: "women",
432
+ tooth: "teeth",
433
+ foot: "feet",
434
+ mouse: "mice",
435
+ goose: "geese",
436
+ ox: "oxen"
437
+ };
438
+ var UNCOUNTABLE = /* @__PURE__ */ new Set([
439
+ "sheep",
440
+ "fish",
441
+ "series",
442
+ "species",
443
+ "deer",
444
+ "information",
445
+ "equipment",
446
+ "money",
447
+ "rice",
448
+ "news"
449
+ ]);
450
+ function pluralize(word, count2) {
451
+ assertString(word, "word");
452
+ if (count2 === 1) return word;
453
+ if (word.length === 0) return word;
454
+ const lower = word.toLowerCase();
455
+ const preserve = (result) => word[0] === word[0].toUpperCase() ? result.charAt(0).toUpperCase() + result.slice(1) : result;
456
+ if (UNCOUNTABLE.has(lower)) return word;
457
+ if (IRREGULAR_PLURALS[lower]) return preserve(IRREGULAR_PLURALS[lower]);
458
+ if (/[^aeiou]y$/.test(lower)) return preserve(lower.slice(0, -1) + "ies");
459
+ if (/(s|ss|sh|ch|x|z)$/.test(lower)) return preserve(lower + "es");
460
+ if (/(fe?)$/.test(lower)) return preserve(lower.replace(/fe?$/, "ves"));
461
+ return preserve(lower + "s");
462
+ }
463
+
464
+ // src/str/padding.ts
465
+ function padLeft(str, length, char = " ") {
466
+ assertString(str);
467
+ if (char.length === 0) return str;
468
+ return str.length >= length ? str : buildPad(char, length - str.length) + str;
469
+ }
470
+ function padRight(str, length, char = " ") {
471
+ assertString(str);
472
+ if (char.length === 0) return str;
473
+ return str.length >= length ? str : str + buildPad(char, length - str.length);
474
+ }
475
+ function padCenter(str, length, char = " ") {
476
+ assertString(str);
477
+ if (char.length === 0 || str.length >= length) return str;
478
+ const total = length - str.length;
479
+ const left = Math.floor(total / 2);
480
+ const right = total - left;
481
+ return buildPad(char, left) + str + buildPad(char, right);
482
+ }
483
+ function buildPad(char, width) {
484
+ if (width <= 0) return "";
485
+ return char.repeat(Math.ceil(width / char.length)).slice(0, width);
486
+ }
487
+ function indent(str, count2 = 2, char = " ", indentEmpty = false) {
488
+ assertString(str);
489
+ const prefix = char.repeat(count2);
490
+ return str.split("\n").map((line) => indentEmpty || line.length > 0 ? prefix + line : line).join("\n");
491
+ }
492
+ function dedent(str) {
493
+ assertString(str);
494
+ const lines = str.replace(/^\n/, "").replace(/\n[ \t]*$/, "").split("\n");
495
+ let min = Infinity;
496
+ for (const line of lines) {
497
+ if (line.trim().length === 0) continue;
498
+ const leading = line.match(/^[ \t]*/)[0].length;
499
+ if (leading < min) min = leading;
500
+ }
501
+ if (!Number.isFinite(min) || min === 0) return lines.join("\n");
502
+ return lines.map((line) => line.slice(min)).join("\n");
503
+ }
504
+
505
+ // src/str/security.ts
506
+ var HTML_ESCAPES = {
507
+ "&": "&amp;",
508
+ "<": "&lt;",
509
+ ">": "&gt;",
510
+ '"': "&quot;",
511
+ "'": "&#39;"
512
+ };
513
+ var HTML_UNESCAPES = {
514
+ "&amp;": "&",
515
+ "&lt;": "<",
516
+ "&gt;": ">",
517
+ "&quot;": '"',
518
+ "&#39;": "'",
519
+ "&#x27;": "'",
520
+ "&apos;": "'",
521
+ "&#x2F;": "/",
522
+ "&#47;": "/"
523
+ };
524
+ function escapeHtml(str) {
525
+ assertString(str);
526
+ return str.replace(/[&<>"']/g, (ch) => HTML_ESCAPES[ch]);
527
+ }
528
+ function unescapeHtml(str) {
529
+ assertString(str);
530
+ return str.replace(/&(?:amp|lt|gt|quot|#39|#x27|apos|#x2F|#47);/g, (ent) => HTML_UNESCAPES[ent]);
531
+ }
532
+ function escapeRegExp(str) {
533
+ assertString(str);
534
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
535
+ }
536
+ function stripTags(str) {
537
+ assertString(str);
538
+ return str.replace(/<[^>]*>/g, "");
539
+ }
540
+ function collapseWhitespace(str) {
541
+ assertString(str);
542
+ return str.replace(/\s+/g, " ").trim();
543
+ }
544
+ function stripPrefix(str, prefix) {
545
+ assertString(str);
546
+ assertString(prefix, "prefix");
547
+ return prefix.length > 0 && str.startsWith(prefix) ? str.slice(prefix.length) : str;
548
+ }
549
+ function stripSuffix(str, suffix) {
550
+ assertString(str);
551
+ assertString(suffix, "suffix");
552
+ return suffix.length > 0 && str.endsWith(suffix) ? str.slice(0, -suffix.length) : str;
553
+ }
554
+
555
+ // src/str/ensuring.ts
556
+ function ensureLeft(str, prefix) {
557
+ assertString(str);
558
+ assertString(prefix, "prefix");
559
+ return str.startsWith(prefix) ? str : prefix + str;
560
+ }
561
+ function ensureRight(str, suffix) {
562
+ assertString(str);
563
+ assertString(suffix, "suffix");
564
+ return str.endsWith(suffix) ? str : str + suffix;
565
+ }
566
+
567
+ exports.between = between;
568
+ exports.betweenAll = betweenAll;
569
+ exports.camelize = camelize;
570
+ exports.capitalize = capitalize;
571
+ exports.capitalizeWords = capitalizeWords;
572
+ exports.collapseWhitespace = collapseWhitespace;
573
+ exports.contains = contains;
574
+ exports.containsAll = containsAll;
575
+ exports.containsAny = containsAny;
576
+ exports.count = count;
577
+ exports.dasherize = dasherize;
578
+ exports.dedent = dedent;
579
+ exports.ensureLeft = ensureLeft;
580
+ exports.ensureRight = ensureRight;
581
+ exports.escapeHtml = escapeHtml;
582
+ exports.escapeRegExp = escapeRegExp;
583
+ exports.humanize = humanize;
584
+ exports.indent = indent;
585
+ exports.insert = insert;
586
+ exports.isAlpha = isAlpha;
587
+ exports.isAlphaNumeric = isAlphaNumeric;
588
+ exports.isBlank = isBlank;
589
+ exports.isEmpty = isEmpty;
590
+ exports.isLowerCase = isLowerCase;
591
+ exports.isNumeric = isNumeric;
592
+ exports.isString = isString;
593
+ exports.isUpperCase = isUpperCase;
594
+ exports.join = join;
595
+ exports.mask = mask;
596
+ exports.ordinalize = ordinalize;
597
+ exports.padCenter = padCenter;
598
+ exports.padLeft = padLeft;
599
+ exports.padRight = padRight;
600
+ exports.pascalize = pascalize;
601
+ exports.pluralize = pluralize;
602
+ exports.random = random;
603
+ exports.randomAlpha = randomAlpha;
604
+ exports.randomAlphanumeric = randomAlphanumeric;
605
+ exports.randomNumeric = randomNumeric;
606
+ exports.reverse = reverse;
607
+ exports.similarity = similarity;
608
+ exports.slugify = slugify;
609
+ exports.stripPrefix = stripPrefix;
610
+ exports.stripSuffix = stripSuffix;
611
+ exports.stripTags = stripTags;
612
+ exports.template = template;
613
+ exports.titleCase = titleCase;
614
+ exports.transliterate = transliterate;
615
+ exports.trim = trim;
616
+ exports.truncate = truncate;
617
+ exports.truncateWords = truncateWords;
618
+ exports.underscore = underscore;
619
+ exports.unescapeHtml = unescapeHtml;
620
+ exports.wordCount = wordCount;
621
+ exports.words = words;
622
+ //# sourceMappingURL=str.cjs.map
623
+ //# sourceMappingURL=str.cjs.map