@zinaid/str 0.0.5 → 0.0.6

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 (52) hide show
  1. package/dist/ascii/index.d.ts +9 -0
  2. package/dist/ascii/index.d.ts.map +1 -0
  3. package/dist/ascii/index.js +7 -0
  4. package/dist/{base64.d.ts → base64/index.d.ts} +1 -1
  5. package/dist/base64/index.d.ts.map +1 -0
  6. package/dist/{convertcase.d.ts → convertcase/index.d.ts} +1 -1
  7. package/dist/convertcase/index.d.ts.map +1 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +135 -131
  11. package/dist/{markdown.d.ts → markdown/index.d.ts} +3 -3
  12. package/dist/markdown/index.d.ts.map +1 -0
  13. package/dist/markdown/index.js +32 -0
  14. package/dist/{pluralizer.d.ts → pluralizer/index.d.ts} +3 -2
  15. package/dist/pluralizer/index.d.ts.map +1 -0
  16. package/dist/{pluralizer.js → pluralizer/index.js} +13 -15
  17. package/dist/{random.d.ts → random/index.d.ts} +3 -3
  18. package/dist/random/index.d.ts.map +1 -0
  19. package/dist/{random.js → random/index.js} +2 -1
  20. package/dist/{replacer.d.ts → replacer/index.d.ts} +1 -1
  21. package/dist/replacer/index.d.ts.map +1 -0
  22. package/dist/str.d.ts +8 -113
  23. package/dist/str.d.ts.map +1 -1
  24. package/dist/str.js +521 -656
  25. package/dist/{stringable.d.ts → stringable/index.d.ts} +2 -2
  26. package/dist/stringable/index.d.ts.map +1 -0
  27. package/dist/transliterate/index.d.ts +9 -0
  28. package/dist/transliterate/index.d.ts.map +1 -0
  29. package/dist/transliterate/index.js +7 -0
  30. package/dist/{trimmer.d.ts → trimmer/index.d.ts} +1 -1
  31. package/dist/trimmer/index.d.ts.map +1 -0
  32. package/dist/ulid/index.d.ts +41 -0
  33. package/dist/ulid/index.d.ts.map +1 -0
  34. package/dist/ulid/index.js +50 -0
  35. package/dist/uuid/index.d.ts +58 -0
  36. package/dist/uuid/index.d.ts.map +1 -0
  37. package/dist/uuid/index.js +50 -0
  38. package/package.json +78 -21
  39. package/dist/base64.d.ts.map +0 -1
  40. package/dist/convertcase.d.ts.map +0 -1
  41. package/dist/markdown.d.ts.map +0 -1
  42. package/dist/markdown.js +0 -55
  43. package/dist/pluralizer.d.ts.map +0 -1
  44. package/dist/random.d.ts.map +0 -1
  45. package/dist/replacer.d.ts.map +0 -1
  46. package/dist/stringable.d.ts.map +0 -1
  47. package/dist/trimmer.d.ts.map +0 -1
  48. /package/dist/{base64.js → base64/index.js} +0 -0
  49. /package/dist/{convertcase.js → convertcase/index.js} +0 -0
  50. /package/dist/{replacer.js → replacer/index.js} +0 -0
  51. /package/dist/{stringable.js → stringable/index.js} +0 -0
  52. /package/dist/{trimmer.js → trimmer/index.js} +0 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Transliterate a UTF-8 value to ASCII.
3
+ *
4
+ * @example
5
+ *
6
+ * ascii('Héllo Wörld'); -> 'Hello World'
7
+ */
8
+ export declare function ascii(value: string): string;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ascii/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3C"}
@@ -0,0 +1,7 @@
1
+ import { transliterate as t } from "transliteration";
2
+ function e(r) {
3
+ return t(r);
4
+ }
5
+ export {
6
+ e as ascii
7
+ };
@@ -4,4 +4,4 @@ export declare function toBase64(value: string): string;
4
4
  */
5
5
  export declare function bytesToBase64(bytes: Uint8Array): string;
6
6
  export declare function fromBase64(value: string, strict?: boolean): string | false;
7
- //# sourceMappingURL=base64.d.ts.map
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base64/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA+B9C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAsBvD;AAED,wBAAgB,UAAU,CACtB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,OAAe,GACxB,MAAM,GAAG,KAAK,CAqEhB"}
@@ -35,4 +35,4 @@ export declare function upper(value: string): string;
35
35
  * title("foO bAr BaZ"); -> "Foo Bar Baz"
36
36
  */
37
37
  export declare function title(value: string): string;
38
- //# sourceMappingURL=convertcase.d.ts.map
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/convertcase/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;CASZ,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,WAAW,CACvB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,eAAgC,GACvC,MAAM,CAER;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3C"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './ascii';
1
2
  export * from './base64';
2
3
  export * from './convertcase';
3
4
  export * from './markdown';
@@ -6,5 +7,8 @@ export * from './random';
6
7
  export * from './replacer';
7
8
  export * from './str';
8
9
  export * from './stringable';
10
+ export * from './transliterate';
9
11
  export * from './trimmer';
12
+ export * from './ulid';
13
+ export * from './uuid';
10
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -1,133 +1,137 @@
1
- import { bytesToBase64 as a, fromBase64 as t, toBase64 as s } from "./base64.js";
2
- import { CaseTypes as n, convertCase as o, title as l, upper as c } from "./convertcase.js";
3
- import { inlineMarkdown as p, markDownRenderer as u, markdown as m } from "./markdown.js";
4
- import { inflector as h, isPlural as g, isSingular as S, matchCase as U, plural as w, singular as b, uncountable as x } from "./pluralizer.js";
5
- import { randomInt as k, randomString as y } from "./random.js";
6
- import { substr as z, substrCount as A, substrReplace as W } from "./replacer.js";
7
- import { after as B, afterLast as L, apa as v, ascii as E, before as M, beforeLast as N, between as P, betweenFirst as T, camel as F, camelCacheSize as D, charAt as I, chopEnd as J, chopStart as O, contains as j, containsAll as G, createRandomStringsNormally as H, createRandomStringsUsing as K, createRandomStringsUsingSequence as Q, createUlidsNormally as V, createUlidsUsing as X, createUlidsUsingSequence as Y, createUuidsNormally as Z, createUuidsUsing as _, createUuidsUsingSequence as $, deduplicate as ee, doesntContain as re, doesntEndWith as ae, doesntStartWith as te, endsWith as se, excerpt as ie, finish as ne, flushCache as oe, freezeUlids as le, freezeUuids as ce, headline as de, is as pe, isAscii as ue, isJson as me, isMatch as fe, isUlid as he, isUrl as ge, isUuid as Se, kebab as Ue, lcfirst as we, length as be, limit as xe, lower as Ce, makePad as ke, mask as ye, match as Re, matchAll as ze, numbers as Ae, padBoth as We, padLeft as qe, padRight as Be, pascal as Le, password as ve, pluralPascal as Ee, pluralStudly as Me, position as Ne, random as Pe, remove as Te, repeat as Fe, replace as De, replaceArray as Ie, replaceEnd as Je, replaceFirst as Oe, replaceLast as je, replaceMatches as Ge, replaceStart as He, reverse as Ke, slug as Qe, snake as Ve, snakeCacheSize as Xe, squish as Ye, start as Ze, startsWith as _e, stripTags as $e, studly as er, studlyCacheSize as rr, swap as ar, take as tr, toStringOr as sr, transliterate as ir, ucfirst as nr, ucsplit as or, ucwords as lr, ulid as cr, unwrap as dr, uuid as pr, uuid7 as ur, wordCount as mr, wordWrap as fr, words as hr, wrap as gr } from "./str.js";
8
- import { Stringable as Ur, of as wr } from "./stringable.js";
9
- import { ltrim as xr, rtrim as Cr, trim as kr } from "./trimmer.js";
1
+ import { ascii as t } from "./ascii/index.js";
2
+ import { bytesToBase64 as s, fromBase64 as i, toBase64 as o } from "./base64/index.js";
3
+ import { CaseTypes as l, convertCase as c, title as p, upper as d } from "./convertcase/index.js";
4
+ import { inlineMarkdown as m, markDownRenderer as f, markdown as h } from "./markdown/index.js";
5
+ import { inflector as S, isPlural as U, isSingular as w, matchCase as x, plural as b, singular as C, uncountable as k } from "./pluralizer/index.js";
6
+ import { randomInt as R, randomString as z } from "./random/index.js";
7
+ import { substr as W, substrCount as q, substrReplace as B } from "./replacer/index.js";
8
+ import { after as v, afterLast as E, apa as M, before as N, beforeLast as P, between as T, betweenFirst as F, camel as D, camelCacheSize as I, charAt as J, chopEnd as O, chopStart as j, contains as G, containsAll as H, createRandomStringsNormally as K, createRandomStringsUsing as Q, createRandomStringsUsingSequence as V, deduplicate as X, doesntContain as Y, doesntEndWith as Z, doesntStartWith as _, endsWith as $, excerpt as ee, finish as re, flushCache as te, headline as ae, is as se, isAscii as ie, isJson as oe, isMatch as ne, isUlid as le, isUrl as ce, kebab as pe, lcfirst as de, length as ue, limit as me, lower as fe, makePad as he, mask as ge, match as Se, matchAll as Ue, numbers as we, padBoth as xe, padLeft as be, padRight as Ce, pascal as ke, password as ye, pluralPascal as Re, pluralStudly as ze, position as Ae, random as We, remove as qe, repeat as Be, replace as Le, replaceArray as ve, replaceEnd as Ee, replaceFirst as Me, replaceLast as Ne, replaceMatches as Pe, replaceStart as Te, reverse as Fe, slug as De, snake as Ie, snakeCacheSize as Je, squish as Oe, start as je, startsWith as Ge, stripTags as He, studly as Ke, studlyCacheSize as Qe, swap as Ve, take as Xe, toStringOr as Ye, ucfirst as Ze, ucsplit as _e, ucwords as $e, unwrap as er, wordCount as rr, wordWrap as tr, words as ar, wrap as sr } from "./str.js";
9
+ import { Stringable as or, of as nr } from "./stringable/index.js";
10
+ import { transliterate as cr } from "./transliterate/index.js";
11
+ import { ltrim as dr, rtrim as ur, trim as mr } from "./trimmer/index.js";
12
+ import { createUlidsNormally as hr, createUlidsUsing as gr, createUlidsUsingSequence as Sr, freezeUlids as Ur, ulid as wr } from "./ulid/index.js";
13
+ import { createUuidsNormally as br, createUuidsUsing as Cr, createUuidsUsingSequence as kr, freezeUuids as yr, isUuid as Rr, uuid as zr, uuid7 as Ar } from "./uuid/index.js";
10
14
  export {
11
- n as CaseTypes,
12
- Ur as Stringable,
13
- B as after,
14
- L as afterLast,
15
- v as apa,
16
- E as ascii,
17
- M as before,
18
- N as beforeLast,
19
- P as between,
20
- T as betweenFirst,
21
- a as bytesToBase64,
22
- F as camel,
23
- D as camelCacheSize,
24
- I as charAt,
25
- J as chopEnd,
26
- O as chopStart,
27
- j as contains,
28
- G as containsAll,
29
- o as convertCase,
30
- H as createRandomStringsNormally,
31
- K as createRandomStringsUsing,
32
- Q as createRandomStringsUsingSequence,
33
- V as createUlidsNormally,
34
- X as createUlidsUsing,
35
- Y as createUlidsUsingSequence,
36
- Z as createUuidsNormally,
37
- _ as createUuidsUsing,
38
- $ as createUuidsUsingSequence,
39
- ee as deduplicate,
40
- re as doesntContain,
41
- ae as doesntEndWith,
42
- te as doesntStartWith,
43
- se as endsWith,
44
- ie as excerpt,
45
- ne as finish,
46
- oe as flushCache,
47
- le as freezeUlids,
48
- ce as freezeUuids,
49
- t as fromBase64,
50
- de as headline,
51
- h as inflector,
52
- p as inlineMarkdown,
53
- pe as is,
54
- ue as isAscii,
55
- me as isJson,
56
- fe as isMatch,
57
- g as isPlural,
58
- S as isSingular,
59
- he as isUlid,
60
- ge as isUrl,
61
- Se as isUuid,
62
- Ue as kebab,
63
- we as lcfirst,
64
- be as length,
65
- xe as limit,
66
- Ce as lower,
67
- xr as ltrim,
68
- ke as makePad,
69
- u as markDownRenderer,
70
- m as markdown,
71
- ye as mask,
72
- Re as match,
73
- ze as matchAll,
74
- U as matchCase,
75
- Ae as numbers,
76
- wr as of,
77
- We as padBoth,
78
- qe as padLeft,
79
- Be as padRight,
80
- Le as pascal,
81
- ve as password,
82
- w as plural,
83
- Ee as pluralPascal,
84
- Me as pluralStudly,
85
- Ne as position,
86
- Pe as random,
87
- k as randomInt,
88
- y as randomString,
89
- Te as remove,
90
- Fe as repeat,
91
- De as replace,
92
- Ie as replaceArray,
93
- Je as replaceEnd,
94
- Oe as replaceFirst,
95
- je as replaceLast,
96
- Ge as replaceMatches,
97
- He as replaceStart,
98
- Ke as reverse,
99
- Cr as rtrim,
100
- b as singular,
101
- Qe as slug,
102
- Ve as snake,
103
- Xe as snakeCacheSize,
104
- Ye as squish,
105
- Ze as start,
106
- _e as startsWith,
107
- $e as stripTags,
108
- er as studly,
109
- rr as studlyCacheSize,
110
- z as substr,
111
- A as substrCount,
112
- W as substrReplace,
113
- ar as swap,
114
- tr as take,
115
- l as title,
116
- s as toBase64,
117
- sr as toStringOr,
118
- ir as transliterate,
119
- kr as trim,
120
- nr as ucfirst,
121
- or as ucsplit,
122
- lr as ucwords,
123
- cr as ulid,
124
- x as uncountable,
125
- dr as unwrap,
126
- c as upper,
127
- pr as uuid,
128
- ur as uuid7,
129
- mr as wordCount,
130
- fr as wordWrap,
131
- hr as words,
132
- gr as wrap
15
+ l as CaseTypes,
16
+ or as Stringable,
17
+ v as after,
18
+ E as afterLast,
19
+ M as apa,
20
+ t as ascii,
21
+ N as before,
22
+ P as beforeLast,
23
+ T as between,
24
+ F as betweenFirst,
25
+ s as bytesToBase64,
26
+ D as camel,
27
+ I as camelCacheSize,
28
+ J as charAt,
29
+ O as chopEnd,
30
+ j as chopStart,
31
+ G as contains,
32
+ H as containsAll,
33
+ c as convertCase,
34
+ K as createRandomStringsNormally,
35
+ Q as createRandomStringsUsing,
36
+ V as createRandomStringsUsingSequence,
37
+ hr as createUlidsNormally,
38
+ gr as createUlidsUsing,
39
+ Sr as createUlidsUsingSequence,
40
+ br as createUuidsNormally,
41
+ Cr as createUuidsUsing,
42
+ kr as createUuidsUsingSequence,
43
+ X as deduplicate,
44
+ Y as doesntContain,
45
+ Z as doesntEndWith,
46
+ _ as doesntStartWith,
47
+ $ as endsWith,
48
+ ee as excerpt,
49
+ re as finish,
50
+ te as flushCache,
51
+ Ur as freezeUlids,
52
+ yr as freezeUuids,
53
+ i as fromBase64,
54
+ ae as headline,
55
+ S as inflector,
56
+ m as inlineMarkdown,
57
+ se as is,
58
+ ie as isAscii,
59
+ oe as isJson,
60
+ ne as isMatch,
61
+ U as isPlural,
62
+ w as isSingular,
63
+ le as isUlid,
64
+ ce as isUrl,
65
+ Rr as isUuid,
66
+ pe as kebab,
67
+ de as lcfirst,
68
+ ue as length,
69
+ me as limit,
70
+ fe as lower,
71
+ dr as ltrim,
72
+ he as makePad,
73
+ f as markDownRenderer,
74
+ h as markdown,
75
+ ge as mask,
76
+ Se as match,
77
+ Ue as matchAll,
78
+ x as matchCase,
79
+ we as numbers,
80
+ nr as of,
81
+ xe as padBoth,
82
+ be as padLeft,
83
+ Ce as padRight,
84
+ ke as pascal,
85
+ ye as password,
86
+ b as plural,
87
+ Re as pluralPascal,
88
+ ze as pluralStudly,
89
+ Ae as position,
90
+ We as random,
91
+ R as randomInt,
92
+ z as randomString,
93
+ qe as remove,
94
+ Be as repeat,
95
+ Le as replace,
96
+ ve as replaceArray,
97
+ Ee as replaceEnd,
98
+ Me as replaceFirst,
99
+ Ne as replaceLast,
100
+ Pe as replaceMatches,
101
+ Te as replaceStart,
102
+ Fe as reverse,
103
+ ur as rtrim,
104
+ C as singular,
105
+ De as slug,
106
+ Ie as snake,
107
+ Je as snakeCacheSize,
108
+ Oe as squish,
109
+ je as start,
110
+ Ge as startsWith,
111
+ He as stripTags,
112
+ Ke as studly,
113
+ Qe as studlyCacheSize,
114
+ W as substr,
115
+ q as substrCount,
116
+ B as substrReplace,
117
+ Ve as swap,
118
+ Xe as take,
119
+ p as title,
120
+ o as toBase64,
121
+ Ye as toStringOr,
122
+ cr as transliterate,
123
+ mr as trim,
124
+ Ze as ucfirst,
125
+ _e as ucsplit,
126
+ $e as ucwords,
127
+ wr as ulid,
128
+ k as uncountable,
129
+ er as unwrap,
130
+ d as upper,
131
+ zr as uuid,
132
+ Ar as uuid7,
133
+ rr as wordCount,
134
+ tr as wordWrap,
135
+ ar as words,
136
+ sr as wrap
133
137
  };
@@ -1,4 +1,4 @@
1
- import { Options as MarkdownItOptions, PluginSimple, PluginWithOptions, default as __DTS_DEFAULT_0__ } from 'markdown-it';
1
+ import { default as MarkdownIt, Options as MarkdownItOptions, PluginSimple, PluginWithOptions } from 'markdown-it';
2
2
  export interface MarkDownOptions extends MarkdownItOptions {
3
3
  gfm?: boolean;
4
4
  anchors?: object | boolean;
@@ -22,5 +22,5 @@ export declare function markdown(value: string, options?: MarkDownOptions, exten
22
22
  * inlineMarkdown("Hello *World*"); -> "<p>Hello <em>World</em></p>"
23
23
  */
24
24
  export declare function inlineMarkdown(value: string, options?: MarkDownOptions, extensions?: MarkDownExtensions): string;
25
- export declare function markDownRenderer(options?: MarkDownOptions, extensions?: MarkDownExtensions): __DTS_DEFAULT_0__;
26
- //# sourceMappingURL=markdown.d.ts.map
25
+ export declare function markDownRenderer(options?: MarkDownOptions, extensions?: MarkDownExtensions): MarkdownIt;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdown/index.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,EAAE,EACf,KAAK,OAAO,IAAI,iBAAiB,EACjC,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACzB,MAAM,aAAa,CAAC;AAIrB,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACtD,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,iBAAiB,GACvB,YAAY,GACZ,iBAAiB,CAAC,OAAO,CAAC,GAC1B,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,EAAE,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACpB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,eAA+C,EACxD,UAAU,GAAE,kBAAuB,GACpC,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,eAA+B,EACxC,UAAU,GAAE,kBAAuB,GACpC,MAAM,CAER;AAED,wBAAgB,gBAAgB,CAC5B,OAAO,GAAE,eAA+C,EACxD,UAAU,GAAE,kBAAuB,cAgCtC"}
@@ -0,0 +1,32 @@
1
+ import { isArray as d } from "@zinaid/utils";
2
+ import k from "markdown-it";
3
+ import p from "markdown-it-anchor";
4
+ import w from "markdown-it-task-lists";
5
+ function y(r, e = { gfm: !0, anchors: !1 }, t = []) {
6
+ return s(e, t).render(r);
7
+ }
8
+ function A(r, e = { gfm: !0 }, t = []) {
9
+ return s(e, t).renderInline(r);
10
+ }
11
+ function s(r = { gfm: !0, anchors: !1 }, e = []) {
12
+ const {
13
+ html: t = !1,
14
+ linkify: i = !0,
15
+ breaks: u = !0,
16
+ gfm: a = !0,
17
+ anchors: f = !1,
18
+ ...m
19
+ } = r, n = new k({ html: t, linkify: i, breaks: u, ...m });
20
+ a && n.use(w, { label: !0, labelAfter: !0 }), f && n.use(p, typeof f == "object" ? f : {});
21
+ for (const o of e)
22
+ if (d(o)) {
23
+ const [l, c] = o;
24
+ n.use(l, c);
25
+ } else o && n.use(o);
26
+ return n;
27
+ }
28
+ export {
29
+ A as inlineMarkdown,
30
+ s as markDownRenderer,
31
+ y as markdown
32
+ };
@@ -1,3 +1,4 @@
1
+ import { default as pluralize } from 'pluralize';
1
2
  export interface PluralizerRules {
2
3
  uncountable: string[];
3
4
  }
@@ -34,5 +35,5 @@ export declare function matchCase(value: string, comparison: string): string;
34
35
  /**
35
36
  * Get the pluralize instance
36
37
  */
37
- export declare function inflector(): typeof import("pluralize");
38
- //# sourceMappingURL=pluralizer.d.ts.map
38
+ export declare function inflector(): typeof pluralize;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAClB,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,MAAU,EACjB,YAAY,GAAE,OAAe,GAC9B,MAAM,CAKR;AAeD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAiBnE;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,SAAS,CAU5C"}
@@ -1,5 +1,6 @@
1
- import { format as u } from "@zinaid/num";
2
- import { isUndefined as l, optionalRequire as s } from "@zinaid/utils";
1
+ import { format as a } from "@zinaid/num";
2
+ import { isUndefined as s } from "@zinaid/utils";
3
+ import l from "pluralize";
3
4
  let r;
4
5
  const o = {
5
6
  uncountable: [
@@ -48,18 +49,18 @@ const o = {
48
49
  "wheat"
49
50
  ]
50
51
  };
51
- function m(e, n = 2, i = !1) {
52
- return (i ? u(n) + " " : "") + f(e, n);
52
+ function w(e, n = 2, i = !1) {
53
+ return (i ? a(n) + " " : "") + f(e, n);
53
54
  }
54
55
  function f(e, n) {
55
56
  if (Math.abs(n) === 1 || c(e))
56
57
  return e;
57
58
  const i = t().plural(e);
58
- return a(i, e);
59
+ return u(i, e);
59
60
  }
60
- function w(e) {
61
+ function b(e) {
61
62
  const n = t().singular(e);
62
- return a(n, e);
63
+ return u(n, e);
63
64
  }
64
65
  function c(e) {
65
66
  return o.uncountable.includes(e.toLowerCase());
@@ -70,14 +71,11 @@ function g(e = "") {
70
71
  function h(e = "") {
71
72
  return t().isSingular(e);
72
73
  }
73
- function a(e, n) {
74
+ function u(e, n) {
74
75
  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;
75
76
  }
76
77
  function t() {
77
- return l(r) && (r = s(
78
- "pluralize",
79
- 'The "pluralize" package is required for pluralization functions. Please install it: npm install pluralize'
80
- ), o.uncountable.forEach(
78
+ return s(r) && (r = l, o.uncountable.forEach(
81
79
  (e) => r.addUncountableRule(e)
82
80
  )), r;
83
81
  }
@@ -85,8 +83,8 @@ export {
85
83
  t as inflector,
86
84
  g as isPlural,
87
85
  h as isSingular,
88
- a as matchCase,
89
- m as plural,
90
- w as singular,
86
+ u as matchCase,
87
+ w as plural,
88
+ b as singular,
91
89
  c as uncountable
92
90
  };
@@ -10,8 +10,8 @@
10
10
  * @returns A random alpha-numeric string of the specified length.
11
11
  *
12
12
  * @example
13
- * Random.string(); // 16 chars
14
- * Random.string(40); // 40 chars
13
+ * randomString(); // 16 chars
14
+ * randomString(40); // 40 chars
15
15
  */
16
16
  export declare function randomString(length?: number): string;
17
17
  /**
@@ -25,4 +25,4 @@ export declare function randomString(length?: number): string;
25
25
  * @throws RangeError if min > max or bounds exceed MAX_SAFE_INTEGER.
26
26
  */
27
27
  export declare function randomInt(min: number, max: number): number;
28
- //# sourceMappingURL=random.d.ts.map
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/random/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,SAAK,GAAG,MAAM,CAehD;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CA4C1D"}
@@ -33,7 +33,8 @@ function l(e, t) {
33
33
  }
34
34
  }
35
35
  function u(e) {
36
- if (e <= 0) return new Uint8Array();
36
+ if (e <= 0)
37
+ return new Uint8Array();
37
38
  if (typeof globalThis.crypto?.getRandomValues == "function")
38
39
  return globalThis.crypto.getRandomValues(new Uint8Array(e));
39
40
  throw new Error("Secure randomness not available in this environment");
@@ -28,4 +28,4 @@ export declare function substrCount(haystack: string, needle: string, offset?: n
28
28
  * @returns
29
29
  */
30
30
  export declare function substrReplace(value: string, replace: string | string[], offset?: number | number[], length?: number | number[] | null): string | string[];
31
- //# sourceMappingURL=replacer.d.ts.map
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/replacer/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAClB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,MAAM,GAAG,IAAW,GAC7B,MAAM,CAWR;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAU,EAClB,MAAM,GAAE,MAAM,GAAG,IAAW,GAC7B,MAAM,CAgBR;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,MAAM,GAAE,MAAM,GAAG,MAAM,EAAM,EAC7B,MAAM,GAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAW,GACxC,MAAM,GAAG,MAAM,EAAE,CAyBnB"}