@tolki/str 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.
package/README.md CHANGED
@@ -62,7 +62,7 @@ However, if you are working on a backend project where bundle size is not a conc
62
62
 
63
63
  These are the string utilities that can be used independently as single functions.
64
64
 
65
- [after](#after) [afterLast](#afterlast) [apa](#apa) [ascii](#ascii) [before](#before) [beforeLast](#beforelast) [between](#between) [betweenFirst](#betweenfirst) [camel](#camel) [charAt](#charat) [chopEnd](#chopend) [chopStart](#chopstart) [contains](#contains) [containsAll](#containsall) [doesntContain](#doesntcontain) [deduplicate](#deduplicate) [doesntEndWith](#doesntendwith) [doesntStartWith](#doesntstartwith) [endsWith](#endswith) [excerpt](#excerpt) [finish](#finish) [fromBase64](#frombase64) [headline](#headline) [initials](#initials) [inlineMarkdown](#inlinemarkdown) [is](#is) [isAscii](#isascii) [isJson](#isjson) [isUrl](#isurl) [isUlid](#isulid) [isUuid](#isuuid) [kebab](#kebab) [lcfirst](#lcfirst) [length](#length) [limit](#limit) [lower](#lower) [markdown](#markdown) [mask](#mask) [match](#match) [matchAll](#matchall) [isMatch](#ismatch) [numbers](#numbers) [padBoth](#padboth) [padLeft](#padleft) [padRight](#padright) [pascal](#pascal) [pluralPascal](#pluralpascal) [password](#password) [plural](#plural) [pluralStudly](#pluralstudly) [position](#position) [random](#random) [remove](#remove) [repeat](#repeat) [replace](#replace) [replaceArray](#replacearray) [replaceFirst](#replacefirst) [replaceLast](#replacelast) [replaceMatches](#replacematches) [replaceStart](#replacestart) [replaceEnd](#replaceend) [reverse](#reverse) [singular](#singular) [slug](#slug) [snake](#snake) [squish](#squish) [start](#start) [startsWith](#startswith) [stripTags](#striptags) [studly](#studly) [substr](#substr) [substrCount](#substrcount) [substrReplace](#substrreplace) [swap](#swap) [take](#take) [title](#title) [toBase64](#tobase64) [transliterate](#transliterate) [trim](#trim) [ltrim](#ltrim) [rtrim](#rtrim) [ucfirst](#ucfirst) [ucsplit](#ucsplit) [ucwords](#ucwords) [upper](#upper) [ulid](#ulid) [unwrap](#unwrap) [uuid](#uuid) [uuid7](#uuid7) [wordCount](#wordcount) [wordWrap](#wordwrap) [words](#words) [wrap](#wrap) [str](#str) [of](#of)
65
+ [after](#after) [afterLast](#afterlast) [apa](#apa) [ascii](#ascii) [before](#before) [beforeLast](#beforelast) [between](#between) [betweenFirst](#betweenfirst) [camel](#camel) [charAt](#charat) [chopEnd](#chopend) [chopStart](#chopstart) [contains](#contains) [containsAll](#containsall) [counted](#counted) [doesntContain](#doesntcontain) [deduplicate](#deduplicate) [doesntEndWith](#doesntendwith) [doesntStartWith](#doesntstartwith) [endsWith](#endswith) [excerpt](#excerpt) [finish](#finish) [fromBase64](#frombase64) [headline](#headline) [initials](#initials) [inlineMarkdown](#inlinemarkdown) [is](#is) [isAscii](#isascii) [isJson](#isjson) [isUrl](#isurl) [isUlid](#isulid) [isUuid](#isuuid) [kebab](#kebab) [lcfirst](#lcfirst) [length](#length) [limit](#limit) [lower](#lower) [markdown](#markdown) [mask](#mask) [match](#match) [matchAll](#matchall) [isMatch](#ismatch) [numbers](#numbers) [padBoth](#padboth) [padLeft](#padleft) [padRight](#padright) [pascal](#pascal) [pluralPascal](#pluralpascal) [password](#password) [plural](#plural) [pluralStudly](#pluralstudly) [position](#position) [random](#random) [remove](#remove) [repeat](#repeat) [replace](#replace) [replaceArray](#replacearray) [replaceFirst](#replacefirst) [replaceLast](#replacelast) [replaceMatches](#replacematches) [replaceStart](#replacestart) [replaceEnd](#replaceend) [reverse](#reverse) [singular](#singular) [slug](#slug) [snake](#snake) [squish](#squish) [start](#start) [startsWith](#startswith) [stripTags](#striptags) [studly](#studly) [substr](#substr) [substrCount](#substrcount) [substrReplace](#substrreplace) [swap](#swap) [take](#take) [title](#title) [toBase64](#tobase64) [transliterate](#transliterate) [trim](#trim) [ltrim](#ltrim) [rtrim](#rtrim) [ucfirst](#ucfirst) [ucsplit](#ucsplit) [ucwords](#ucwords) [upper](#upper) [ulid](#ulid) [unwrap](#unwrap) [uuid](#uuid) [uuid7](#uuid7) [wordCount](#wordcount) [wordWrap](#wordwrap) [words](#words) [wrap](#wrap) [str](#str) [of](#of)
66
66
 
67
67
  ### String Utilities Details
68
68
 
@@ -286,6 +286,32 @@ const result = containsAll("This is my name", ["MY", "NAME"], true);
286
286
  // result is true
287
287
  ```
288
288
 
289
+ #### counted
290
+
291
+ Get the plural form of an English word with the count prepended.
292
+
293
+ ```javascript
294
+ import { counted } from "@tolki/str";
295
+
296
+ const result = counted("order", 1);
297
+
298
+ // result is "1 order"
299
+
300
+ const result2 = counted("order", 1000);
301
+
302
+ // result2 is "1,000 orders"
303
+ ```
304
+
305
+ You may also pass an array as the count, in which case its length is used:
306
+
307
+ ```javascript
308
+ import { counted } from "@tolki/str";
309
+
310
+ const result = counted("order", ["a", "b"]);
311
+
312
+ // result is "2 orders"
313
+ ```
314
+
289
315
  #### doesntContain
290
316
 
291
317
  Determine if a given string doesn't contain a given substring.
@@ -437,7 +463,7 @@ import { excerpt } from "@tolki/str";
437
463
 
438
464
  const result = excerpt("This is my name", "my", { radius: 3 });
439
465
 
440
- // result is "... is my na ..."
466
+ // result is "...is my na..."
441
467
  ```
442
468
 
443
469
  The radius option, which defaults to 100, allows you to define the number of characters that should appear on each side of the truncated string.
@@ -584,7 +610,7 @@ const result = is("*.jpg", "photo.JPG", true);
584
610
 
585
611
  #### isAscii
586
612
 
587
- Determine if a given string is 7 bit ASCII.
613
+ Determine if a given string is 7-bit ASCII.
588
614
 
589
615
  ```javascript
590
616
  import { isAscii } from "@tolki/str";
@@ -834,7 +860,7 @@ const result = mask("taylor@example.com", "*", 3);
834
860
  // result is "tay***************"
835
861
  ```
836
862
 
837
- If needed, you provide a negative value for the third argument, which instructs the function to begin masking from the end of the string. A fourth argument may also provided to specify the number of masked characters.
863
+ If needed, you may provide a negative value for the third argument, which instructs the function to begin masking from the end of the string. A fourth argument may also be provided to specify the number of masked characters.
838
864
 
839
865
  ```javascript
840
866
  import { mask } from "@tolki/str";
@@ -986,6 +1012,8 @@ const result = pluralPascal("HelloWorld");
986
1012
 
987
1013
  #### password
988
1014
 
1015
+ `password`, `random`, `ulid`, `uuid`, and `uuid7` (along with their `createXUsing`/`createXNormally` testing helpers) generate a new value on every call, so a live playground would just show a different, unverifiable result each time you touch it — there's no live example for these.
1016
+
989
1017
  Generate a random, secure password.
990
1018
 
991
1019
  ```javascript
@@ -1317,7 +1345,7 @@ const result2 = singular("children");
1317
1345
 
1318
1346
  #### slug
1319
1347
 
1320
- Generate a URL friendly "slug" from a given string.
1348
+ Generate a URL-friendly "slug" from a given string.
1321
1349
 
1322
1350
  ```javascript
1323
1351
  import { slug } from "@tolki/str";
@@ -1475,7 +1503,7 @@ const result = swap(
1475
1503
  "Tacos are great!",
1476
1504
  );
1477
1505
 
1478
- // result is "Burritos are fantastic"
1506
+ // result is "Burritos are fantastic!"
1479
1507
  ```
1480
1508
 
1481
1509
  #### take
@@ -1518,6 +1546,10 @@ const result = toBase64("Laravel");
1518
1546
  // result is "TGFyYXZlbA=="
1519
1547
  ```
1520
1548
 
1549
+ #### trans
1550
+
1551
+ This function is purposely not implemented. Laravel's `Str::trans` resolves translation keys through the framework's localization system, which has no equivalent in this library. Use a JavaScript i18n library (such as [i18next](https://www.i18next.com/) or [FormatJS](https://formatjs.github.io/)) to translate strings instead.
1552
+
1521
1553
  #### transliterate
1522
1554
 
1523
1555
  Transliterate a string to its closest ASCII representation.
@@ -1773,6 +1805,11 @@ dog.
1773
1805
  */
1774
1806
  ```
1775
1807
 
1808
+ ' },
1809
+ { name: 'cutLongWords', type: 'boolean', default: false },
1810
+ ]"
1811
+ />
1812
+
1776
1813
  #### words
1777
1814
 
1778
1815
  Limit the number of words in a string.
@@ -1807,6 +1844,8 @@ Using the `str` or `of` functions is discouraged for frontend projects because i
1807
1844
 
1808
1845
  For frontend projects, it is recommended to use the individual string functions instead for better tree-shaking and smaller bundle sizes.
1809
1846
 
1847
+ Also unlike the standalone functions on this page, `str`/`of` return a `Stringable` class instance rather than a plain value, so there's no live playground for them here — try the fluent methods it exposes (like `.append()` or `.snake()`) directly in your own code instead.
1848
+
1810
1849
  Get a new Stringable object from the given string.
1811
1850
 
1812
1851
  ```javascript
package/dist/index.js CHANGED
@@ -1,140 +1,141 @@
1
1
  import { ascii as t, slug as a } from "./ascii/index.js";
2
2
  import { bytesToBase64 as i, fromBase64 as o, toBase64 as n } from "./base64/index.js";
3
- import { CaseTypes as c, convertCase as p, title as d, upper as u } from "./convertcase/index.js";
3
+ import { CaseTypes as c, convertCase as d, title as p, upper as u } from "./convertcase/index.js";
4
4
  import { inlineMarkdown as f, markDownRenderer as h, markdown as g } from "./markdown/index.js";
5
- import { inflector as U, isPlural as w, isSingular as x, matchCase as b, plural as y, pluralPascal as C, pluralStudly as k, singular as R, uncountable as z } from "./pluralizer/index.js";
6
- import { randomInt as W, randomString as q } from "./random/index.js";
7
- import { substr as L, substrCount as v, substrReplace as E } from "./replacer/index.js";
8
- import { after as M, afterLast as N, apa as P, before as T, beforeLast as D, between as I, betweenFirst as J, camel as O, camelCacheSize as j, charAt as G, chopEnd as H, chopStart as K, contains as Q, containsAll as V, createRandomStringsNormally as X, createRandomStringsUsing as Y, createRandomStringsUsingSequence as Z, deduplicate as _, doesntContain as $, doesntEndWith as ee, doesntStartWith as re, endsWith as te, excerpt as ae, finish as se, flushCache as ie, headline as oe, initials as ne, is as le, isAscii as ce, isJson as pe, isMatch as de, isUrl as ue, kebab as me, lcfirst as fe, length as he, limit as ge, lower as Se, makePad as Ue, mask as we, match as xe, matchAll as be, numbers as ye, padBoth as Ce, padLeft as ke, padRight as Re, pascal as ze, password as Ae, position as We, random as qe, remove as Be, repeat as Le, replace as ve, replaceArray as Ee, replaceEnd as Fe, replaceFirst as Me, replaceLast as Ne, replaceMatches as Pe, replaceStart as Te, resetFactoryState as De, reverse as Ie, snake as Je, snakeCacheSize as Oe, squish as je, start as Ge, startsWith as He, stripTags as Ke, studly as Qe, studlyCacheSize as Ve, swap as Xe, take as Ye, toStringOr as Ze, ucfirst as _e, ucsplit as $e, ucwords as er, unwrap as rr, wordCount as tr, wordWrap as ar, words as sr, wrap as ir } from "./str.js";
9
- import { Stringable as nr, of as lr, str as cr } from "./stringable/index.js";
10
- import { transliterate as dr } from "./transliterate/index.js";
11
- import { ltrim as mr, rtrim as fr, trim as hr } from "./trimmer/index.js";
12
- import { createUlidsNormally as Sr, createUlidsUsing as Ur, createUlidsUsingSequence as wr, freezeUlids as xr, isUlid as br, ulid as yr } from "./ulid/index.js";
13
- import { createUuidsNormally as kr, createUuidsUsing as Rr, createUuidsUsingSequence as zr, freezeUuids as Ar, isUuid as Wr, uuid as qr, uuid7 as Br } from "./uuid/index.js";
5
+ import { counted as U, inflector as w, isPlural as x, isSingular as b, matchCase as y, plural as C, pluralPascal as k, pluralStudly as R, singular as z, uncountable as A } from "./pluralizer/index.js";
6
+ import { randomInt as q, randomString as B } from "./random/index.js";
7
+ import { substr as v, substrCount as E, substrReplace as F } from "./replacer/index.js";
8
+ import { after as N, afterLast as P, apa as T, before as D, beforeLast as I, between as J, betweenFirst as O, camel as j, camelCacheSize as G, charAt as H, chopEnd as K, chopStart as Q, contains as V, containsAll as X, createRandomStringsNormally as Y, createRandomStringsUsing as Z, createRandomStringsUsingSequence as _, deduplicate as $, doesntContain as ee, doesntEndWith as re, doesntStartWith as te, endsWith as ae, excerpt as se, finish as ie, flushCache as oe, headline as ne, initials as le, is as ce, isAscii as de, isJson as pe, isMatch as ue, isUrl as me, kebab as fe, lcfirst as he, length as ge, limit as Se, lower as Ue, makePad as we, mask as xe, match as be, matchAll as ye, numbers as Ce, padBoth as ke, padLeft as Re, padRight as ze, pascal as Ae, password as We, position as qe, random as Be, remove as Le, repeat as ve, replace as Ee, replaceArray as Fe, replaceEnd as Me, replaceFirst as Ne, replaceLast as Pe, replaceMatches as Te, replaceStart as De, resetFactoryState as Ie, reverse as Je, snake as Oe, snakeCacheSize as je, squish as Ge, start as He, startsWith as Ke, stripTags as Qe, studly as Ve, studlyCacheSize as Xe, swap as Ye, take as Ze, toStringOr as _e, ucfirst as $e, ucsplit as er, ucwords as rr, unwrap as tr, wordCount as ar, wordWrap as sr, words as ir, wrap as or } from "./str.js";
9
+ import { Stringable as lr, of as cr, str as dr } from "./stringable/index.js";
10
+ import { transliterate as ur } from "./transliterate/index.js";
11
+ import { ltrim as fr, rtrim as hr, trim as gr } from "./trimmer/index.js";
12
+ import { createUlidsNormally as Ur, createUlidsUsing as wr, createUlidsUsingSequence as xr, freezeUlids as br, isUlid as yr, ulid as Cr } from "./ulid/index.js";
13
+ import { createUuidsNormally as Rr, createUuidsUsing as zr, createUuidsUsingSequence as Ar, freezeUuids as Wr, isUuid as qr, uuid as Br, uuid7 as Lr } from "./uuid/index.js";
14
14
  export {
15
15
  c as CaseTypes,
16
- nr as Stringable,
17
- M as after,
18
- N as afterLast,
19
- P as apa,
16
+ lr as Stringable,
17
+ N as after,
18
+ P as afterLast,
19
+ T as apa,
20
20
  t as ascii,
21
- T as before,
22
- D as beforeLast,
23
- I as between,
24
- J as betweenFirst,
21
+ D as before,
22
+ I as beforeLast,
23
+ J as between,
24
+ O as betweenFirst,
25
25
  i as bytesToBase64,
26
- O as camel,
27
- j as camelCacheSize,
28
- G as charAt,
29
- H as chopEnd,
30
- K as chopStart,
31
- Q as contains,
32
- V as containsAll,
33
- p as convertCase,
34
- X as createRandomStringsNormally,
35
- Y as createRandomStringsUsing,
36
- Z as createRandomStringsUsingSequence,
37
- Sr as createUlidsNormally,
38
- Ur as createUlidsUsing,
39
- wr as createUlidsUsingSequence,
40
- kr as createUuidsNormally,
41
- Rr as createUuidsUsing,
42
- zr as createUuidsUsingSequence,
43
- _ as deduplicate,
44
- $ as doesntContain,
45
- ee as doesntEndWith,
46
- re as doesntStartWith,
47
- te as endsWith,
48
- ae as excerpt,
49
- se as finish,
50
- ie as flushCache,
51
- xr as freezeUlids,
52
- Ar as freezeUuids,
26
+ j as camel,
27
+ G as camelCacheSize,
28
+ H as charAt,
29
+ K as chopEnd,
30
+ Q as chopStart,
31
+ V as contains,
32
+ X as containsAll,
33
+ d as convertCase,
34
+ U as counted,
35
+ Y as createRandomStringsNormally,
36
+ Z as createRandomStringsUsing,
37
+ _ as createRandomStringsUsingSequence,
38
+ Ur as createUlidsNormally,
39
+ wr as createUlidsUsing,
40
+ xr as createUlidsUsingSequence,
41
+ Rr as createUuidsNormally,
42
+ zr as createUuidsUsing,
43
+ Ar as createUuidsUsingSequence,
44
+ $ as deduplicate,
45
+ ee as doesntContain,
46
+ re as doesntEndWith,
47
+ te as doesntStartWith,
48
+ ae as endsWith,
49
+ se as excerpt,
50
+ ie as finish,
51
+ oe as flushCache,
52
+ br as freezeUlids,
53
+ Wr as freezeUuids,
53
54
  o as fromBase64,
54
- oe as headline,
55
- U as inflector,
56
- ne as initials,
55
+ ne as headline,
56
+ w as inflector,
57
+ le as initials,
57
58
  f as inlineMarkdown,
58
- le as is,
59
- ce as isAscii,
59
+ ce as is,
60
+ de as isAscii,
60
61
  pe as isJson,
61
- de as isMatch,
62
- w as isPlural,
63
- x as isSingular,
64
- br as isUlid,
65
- ue as isUrl,
66
- Wr as isUuid,
67
- me as kebab,
68
- fe as lcfirst,
69
- he as length,
70
- ge as limit,
71
- Se as lower,
72
- mr as ltrim,
73
- Ue as makePad,
62
+ ue as isMatch,
63
+ x as isPlural,
64
+ b as isSingular,
65
+ yr as isUlid,
66
+ me as isUrl,
67
+ qr as isUuid,
68
+ fe as kebab,
69
+ he as lcfirst,
70
+ ge as length,
71
+ Se as limit,
72
+ Ue as lower,
73
+ fr as ltrim,
74
+ we as makePad,
74
75
  h as markDownRenderer,
75
76
  g as markdown,
76
- we as mask,
77
- xe as match,
78
- be as matchAll,
79
- b as matchCase,
80
- ye as numbers,
81
- lr as of,
82
- Ce as padBoth,
83
- ke as padLeft,
84
- Re as padRight,
85
- ze as pascal,
86
- Ae as password,
87
- y as plural,
88
- C as pluralPascal,
89
- k as pluralStudly,
90
- We as position,
91
- qe as random,
92
- W as randomInt,
93
- q as randomString,
94
- Be as remove,
95
- Le as repeat,
96
- ve as replace,
97
- Ee as replaceArray,
98
- Fe as replaceEnd,
99
- Me as replaceFirst,
100
- Ne as replaceLast,
101
- Pe as replaceMatches,
102
- Te as replaceStart,
103
- De as resetFactoryState,
104
- Ie as reverse,
105
- fr as rtrim,
106
- R as singular,
77
+ xe as mask,
78
+ be as match,
79
+ ye as matchAll,
80
+ y as matchCase,
81
+ Ce as numbers,
82
+ cr as of,
83
+ ke as padBoth,
84
+ Re as padLeft,
85
+ ze as padRight,
86
+ Ae as pascal,
87
+ We as password,
88
+ C as plural,
89
+ k as pluralPascal,
90
+ R as pluralStudly,
91
+ qe as position,
92
+ Be as random,
93
+ q as randomInt,
94
+ B as randomString,
95
+ Le as remove,
96
+ ve as repeat,
97
+ Ee as replace,
98
+ Fe as replaceArray,
99
+ Me as replaceEnd,
100
+ Ne as replaceFirst,
101
+ Pe as replaceLast,
102
+ Te as replaceMatches,
103
+ De as replaceStart,
104
+ Ie as resetFactoryState,
105
+ Je as reverse,
106
+ hr as rtrim,
107
+ z as singular,
107
108
  a as slug,
108
- Je as snake,
109
- Oe as snakeCacheSize,
110
- je as squish,
111
- Ge as start,
112
- He as startsWith,
113
- cr as str,
114
- Ke as stripTags,
115
- Qe as studly,
116
- Ve as studlyCacheSize,
117
- L as substr,
118
- v as substrCount,
119
- E as substrReplace,
120
- Xe as swap,
121
- Ye as take,
122
- d as title,
109
+ Oe as snake,
110
+ je as snakeCacheSize,
111
+ Ge as squish,
112
+ He as start,
113
+ Ke as startsWith,
114
+ dr as str,
115
+ Qe as stripTags,
116
+ Ve as studly,
117
+ Xe as studlyCacheSize,
118
+ v as substr,
119
+ E as substrCount,
120
+ F as substrReplace,
121
+ Ye as swap,
122
+ Ze as take,
123
+ p as title,
123
124
  n as toBase64,
124
- Ze as toStringOr,
125
- dr as transliterate,
126
- hr as trim,
127
- _e as ucfirst,
128
- $e as ucsplit,
129
- er as ucwords,
130
- yr as ulid,
131
- z as uncountable,
132
- rr as unwrap,
125
+ _e as toStringOr,
126
+ ur as transliterate,
127
+ gr as trim,
128
+ $e as ucfirst,
129
+ er as ucsplit,
130
+ rr as ucwords,
131
+ Cr as ulid,
132
+ A as uncountable,
133
+ tr as unwrap,
133
134
  u as upper,
134
- qr as uuid,
135
- Br as uuid7,
136
- tr as wordCount,
137
- ar as wordWrap,
138
- sr as words,
139
- ir as wrap
135
+ Br as uuid,
136
+ Lr as uuid7,
137
+ ar as wordCount,
138
+ sr as wordWrap,
139
+ ir as words,
140
+ or as wrap
140
141
  };
@@ -38,7 +38,19 @@ export declare function pluralPascal(value: string, count?: number): string;
38
38
  *
39
39
  * @requires {@link https://www.npmjs.com/package/pluralize pluralize package}
40
40
  */
41
- export declare function plural(value: string, count?: number, prependCount?: boolean): string;
41
+ export declare function plural(value: string, count?: number | unknown[], prependCount?: boolean): string;
42
+ /**
43
+ * Get the plural form of an English word with the count prepended.
44
+ *
45
+ * @param value - The word to pluralize.
46
+ * @param count - The count to determine pluralization. Arrays are counted by length.
47
+ * @returns The pluralized word with the formatted count prepended.
48
+ *
49
+ * @see https://tolki.abe.dev/strings/string-utilities-list.html#counted
50
+ *
51
+ * @requires {@link https://www.npmjs.com/package/pluralize pluralize package}
52
+ */
53
+ export declare function counted(value: string, count: number | unknown[]): string;
42
54
  /**
43
55
  * Get the singular form of an English word.
44
56
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pluralizer/index.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,WAAW,eAAe;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAoDD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,MAAM,CAKrE;AAED;;;;;;;;;;GAUG;AACH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e,GAC9B,MAAM,CAOR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,MAAM,CAExE;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAEpD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAiBnE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,SAAS,CAU5C"}
@@ -1,8 +1,8 @@
1
- import { format as s } from "@tolki/num";
2
- import { isUndefined as l } from "@tolki/utils";
3
- import f from "pluralize";
4
- let t;
5
- const o = {
1
+ import { format as l } from "@tolki/num";
2
+ import { isUndefined as f, isNumber as c } from "@tolki/utils";
3
+ import p from "pluralize";
4
+ let i;
5
+ const u = {
6
6
  uncountable: [
7
7
  "audio",
8
8
  "bison",
@@ -49,51 +49,56 @@ const o = {
49
49
  "wheat"
50
50
  ]
51
51
  };
52
- function c(e, n = 2) {
53
- const r = e.split(/(?=[A-Z])/), a = String(r.pop());
54
- return r.join("") + p(a, n);
52
+ function d(e, n = 2) {
53
+ const t = e.split(/(?=[A-Z])/), r = String(t.pop());
54
+ return t.join("") + a(r, n);
55
55
  }
56
- function h(e, n = 2) {
57
- return c(e, n);
56
+ function C(e, n = 2) {
57
+ return d(e, n);
58
58
  }
59
- function p(e, n = 2, r = !1) {
60
- return (r ? s(n) + " " : "") + d(e, n);
59
+ function a(e, n = 2, t = !1) {
60
+ const r = c(n) ? n : n.length;
61
+ return (t ? l(r) + " " : "") + m(e, r);
61
62
  }
62
- function d(e, n) {
63
- if (Math.abs(n) === 1 || m(e))
63
+ function U(e, n) {
64
+ return a(e, n, !0);
65
+ }
66
+ function m(e, n) {
67
+ if (Math.abs(n) === 1 || g(e))
64
68
  return e;
65
- const r = i().plural(e);
66
- return u(r, e);
69
+ const t = o().plural(e);
70
+ return s(t, e);
67
71
  }
68
- function C(e) {
69
- const n = i().singular(e);
70
- return u(n, e);
72
+ function k(e) {
73
+ const n = o().singular(e);
74
+ return s(n, e);
71
75
  }
72
- function m(e) {
73
- return o.uncountable.includes(e.toLowerCase());
76
+ function g(e) {
77
+ return u.uncountable.includes(e.toLowerCase());
74
78
  }
75
- function U(e = "") {
76
- return i().isPlural(e);
79
+ function S(e = "") {
80
+ return o().isPlural(e);
77
81
  }
78
- function k(e = "") {
79
- return i().isSingular(e);
82
+ function j(e = "") {
83
+ return o().isSingular(e);
80
84
  }
81
- function u(e, n) {
85
+ function s(e, n) {
82
86
  return n.toLowerCase() === n ? e.toLowerCase() : n.toUpperCase() === n ? e.toUpperCase() : n[0] && n[0].toUpperCase() + n.slice(1) === n ? (e[0] ?? "").toUpperCase() + e.slice(1) : e;
83
87
  }
84
- function i() {
85
- return l(t) && (t = f, o.uncountable.forEach(
86
- (e) => t.addUncountableRule(e)
87
- )), t;
88
+ function o() {
89
+ return f(i) && (i = p, u.uncountable.forEach(
90
+ (e) => i.addUncountableRule(e)
91
+ )), i;
88
92
  }
89
93
  export {
90
- i as inflector,
91
- U as isPlural,
92
- k as isSingular,
93
- u as matchCase,
94
- p as plural,
95
- h as pluralPascal,
96
- c as pluralStudly,
97
- C as singular,
98
- m as uncountable
94
+ U as counted,
95
+ o as inflector,
96
+ S as isPlural,
97
+ j as isSingular,
98
+ s as matchCase,
99
+ a as plural,
100
+ C as pluralPascal,
101
+ d as pluralStudly,
102
+ k as singular,
103
+ g as uncountable
99
104
  };
package/dist/str.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"str.d.ts","sourceRoot":"","sources":["../src/str.ts"],"names":[],"mappings":"AA6BA;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAatE;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAY1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAQvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAY3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,EAAE,EAAE,MAAM,GAAG,MAAM,GACpB,MAAM,CAMR;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,EAAE,EAAE,MAAM,GAAG,MAAM,GACpB,MAAM,CAMR;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAarE;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAW5E;AAED;;;;;;;;GAQG;AAC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AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAIjC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC"}
package/dist/str.js CHANGED
@@ -84,10 +84,11 @@ function Lt(t, e = "", n = {}) {
84
84
  return A !== h && (A = A + s), w + a + A;
85
85
  }
86
86
  function Et(t, e, n = !1) {
87
- for (const r of e)
88
- if (!H(t, r, n))
87
+ let r = !1;
88
+ for (const s of e)
89
+ if (r = !0, !H(t, s, n))
89
90
  return !1;
90
- return !0;
91
+ return r;
91
92
  }
92
93
  function Rt(t, e, n = !1) {
93
94
  return !H(t, e, n);
@@ -150,6 +150,13 @@ export declare class Stringable {
150
150
  * @returns The converted string as a new Stringable instance.
151
151
  */
152
152
  convertCase(mode: ConvertCaseMode): Stringable;
153
+ /**
154
+ * Get the plural form of an English word with the count prepended.
155
+ *
156
+ * @param count - The count to determine pluralization. Arrays are counted by length.
157
+ * @returns The pluralized string with the formatted count prepended, as a new Stringable instance.
158
+ */
159
+ counted(count: number | unknown[]): Stringable;
153
160
  /**
154
161
  * Replace consecutive instances of a given character with a single character.
155
162
  *
@@ -383,11 +390,11 @@ export declare class Stringable {
383
390
  /**
384
391
  * Get the plural form of an English word.
385
392
  *
386
- * @param count - The count to determine singular or plural form. Defaults to 2.
393
+ * @param count - The count to determine singular or plural form. Arrays are counted by length. Defaults to 2.
387
394
  * @param prependCount - Whether to prepend the count to the result. Defaults to false.
388
395
  * @returns The pluralized string as a new Stringable instance.
389
396
  */
390
- plural(count?: number, prependCount?: boolean): Stringable;
397
+ plural(count?: number | unknown[], prependCount?: boolean): Stringable;
391
398
  /**
392
399
  * Pluralize the last word of an English, studly caps case string.
393
400
  *