@stryke/string-format 0.12.12 → 0.12.20
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/CHANGELOG.md +485 -0
- package/README.md +19 -9
- package/dist/acronyms-Clf_sxuQ.d.mts +17 -0
- package/dist/acronyms-Clf_sxuQ.d.mts.map +1 -0
- package/dist/acronyms-CqHURYjd.mjs +2 -0
- package/dist/acronyms-CqHURYjd.mjs.map +1 -0
- package/dist/acronyms-D4QIJv0a.d.cts +17 -0
- package/dist/acronyms-D4QIJv0a.d.cts.map +1 -0
- package/dist/acronyms-DiyHB1FK.cjs +1 -0
- package/dist/acronyms.cjs +1 -923
- package/dist/acronyms.d.cts +2 -0
- package/dist/acronyms.d.mts +2 -0
- package/dist/acronyms.mjs +1 -1
- package/dist/articles-Cla7DH2n.d.mts +5 -0
- package/dist/articles-Cla7DH2n.d.mts.map +1 -0
- package/dist/articles-D9xvmhoM.cjs +1 -0
- package/dist/articles-DzjpMs-D.d.cts +5 -0
- package/dist/articles-DzjpMs-D.d.cts.map +1 -0
- package/dist/articles-Dzsbtfwj.mjs +2 -0
- package/dist/articles-Dzsbtfwj.mjs.map +1 -0
- package/dist/articles.cjs +1 -7
- package/dist/articles.d.cts +2 -0
- package/dist/articles.d.mts +2 -0
- package/dist/articles.mjs +1 -1
- package/dist/base-BHbehXQX.mjs +2 -0
- package/dist/base-BHbehXQX.mjs.map +1 -0
- package/dist/base-DdjslzIj.cjs +1 -0
- package/dist/{camel-case.d.ts → camel-case-BjbgGrxH.d.mts} +6 -2
- package/dist/camel-case-BjbgGrxH.d.mts.map +1 -0
- package/dist/camel-case-C05avVyv.cjs +1 -0
- package/dist/camel-case-CZhC2BRe.d.cts +24 -0
- package/dist/camel-case-CZhC2BRe.d.cts.map +1 -0
- package/dist/camel-case-GuOpCLmz.mjs +2 -0
- package/dist/camel-case-GuOpCLmz.mjs.map +1 -0
- package/dist/camel-case.cjs +1 -15
- package/dist/camel-case.d.cts +2 -0
- package/dist/camel-case.d.mts +2 -0
- package/dist/camel-case.mjs +1 -1
- package/dist/combine-CAxhmyey.mjs +2 -0
- package/dist/combine-CAxhmyey.mjs.map +1 -0
- package/dist/combine-DZZlBlm_.d.cts +12 -0
- package/dist/combine-DZZlBlm_.d.cts.map +1 -0
- package/dist/combine-PAQYt88F.cjs +1 -0
- package/dist/combine-g1cpXeuj.d.mts +12 -0
- package/dist/combine-g1cpXeuj.d.mts.map +1 -0
- package/dist/combine.cjs +1 -9
- package/dist/combine.d.cts +2 -0
- package/dist/combine.d.mts +2 -0
- package/dist/combine.mjs +1 -1
- package/dist/conjunctions-B7prVj02.d.mts +5 -0
- package/dist/conjunctions-B7prVj02.d.mts.map +1 -0
- package/dist/conjunctions-CWyOkdmq.mjs +2 -0
- package/dist/conjunctions-CWyOkdmq.mjs.map +1 -0
- package/dist/conjunctions-CaM47PDl.cjs +1 -0
- package/dist/conjunctions-Chb943kG.d.cts +5 -0
- package/dist/conjunctions-Chb943kG.d.cts.map +1 -0
- package/dist/conjunctions.cjs +1 -7
- package/dist/conjunctions.d.cts +2 -0
- package/dist/conjunctions.d.mts +2 -0
- package/dist/conjunctions.mjs +1 -1
- package/dist/constant-case-B0oTEBjC.cjs +1 -0
- package/dist/constant-case-Cn0OS_D5.mjs +2 -0
- package/dist/constant-case-Cn0OS_D5.mjs.map +1 -0
- package/dist/{constant-case.d.ts → constant-case-m6XLIpEZ.d.mts} +6 -2
- package/dist/constant-case-m6XLIpEZ.d.mts.map +1 -0
- package/dist/constant-case-w4mBqXc4.d.cts +24 -0
- package/dist/constant-case-w4mBqXc4.d.cts.map +1 -0
- package/dist/constant-case.cjs +1 -15
- package/dist/constant-case.d.cts +2 -0
- package/dist/constant-case.d.mts +2 -0
- package/dist/constant-case.mjs +1 -1
- package/dist/{deburr.d.ts → deburr-Bc41oTWI.d.mts} +5 -1
- package/dist/deburr-Bc41oTWI.d.mts.map +1 -0
- package/dist/deburr-Brmq0CIE.d.cts +24 -0
- package/dist/deburr-Brmq0CIE.d.cts.map +1 -0
- package/dist/deburr-Ct9BIF1O.mjs +2 -0
- package/dist/deburr-Ct9BIF1O.mjs.map +1 -0
- package/dist/deburr-ulWvJuGq.cjs +1 -0
- package/dist/deburr.cjs +1 -10
- package/dist/deburr.d.cts +2 -0
- package/dist/deburr.d.mts +2 -0
- package/dist/deburr.mjs +1 -1
- package/dist/decamelize-CO4-wIwF.cjs +1 -0
- package/dist/{decamelize.d.ts → decamelize-CXxqH9_o.d.mts} +5 -1
- package/dist/decamelize-CXxqH9_o.d.mts.map +1 -0
- package/dist/decamelize-CuI8547m.mjs +2 -0
- package/dist/decamelize-CuI8547m.mjs.map +1 -0
- package/dist/decamelize-esVsRIRg.d.cts +11 -0
- package/dist/decamelize-esVsRIRg.d.cts.map +1 -0
- package/dist/decamelize.cjs +1 -9
- package/dist/decamelize.d.cts +2 -0
- package/dist/decamelize.d.mts +2 -0
- package/dist/decamelize.mjs +1 -1
- package/dist/{escape.d.ts → escape-C1LTGJQ1.d.cts} +5 -1
- package/dist/escape-C1LTGJQ1.d.cts.map +1 -0
- package/dist/escape-C44shywT.d.mts +21 -0
- package/dist/escape-C44shywT.d.mts.map +1 -0
- package/dist/escape-CRoXgV4v.cjs +1 -0
- package/dist/escape-CydJ1P9x.mjs +2 -0
- package/dist/escape-CydJ1P9x.mjs.map +1 -0
- package/dist/escape.cjs +1 -16
- package/dist/escape.d.cts +2 -0
- package/dist/escape.d.mts +2 -0
- package/dist/escape.mjs +1 -1
- package/dist/format-special-cases-CuctZ76T.cjs +1 -0
- package/dist/format-special-cases-DLTiwMAS.d.mts +23 -0
- package/dist/format-special-cases-DLTiwMAS.d.mts.map +1 -0
- package/dist/format-special-cases-Db69zjlV.d.cts +23 -0
- package/dist/format-special-cases-Db69zjlV.d.cts.map +1 -0
- package/dist/format-special-cases-F9O32YcB.mjs +2 -0
- package/dist/format-special-cases-F9O32YcB.mjs.map +1 -0
- package/dist/format-special-cases.cjs +1 -17
- package/dist/format-special-cases.d.cts +2 -0
- package/dist/format-special-cases.d.mts +2 -0
- package/dist/format-special-cases.mjs +1 -1
- package/dist/{get-words.d.ts → get-words-Cdgu0ngS.d.cts} +16 -12
- package/dist/get-words-Cdgu0ngS.d.cts.map +1 -0
- package/dist/get-words-De8YIU0J.d.mts +47 -0
- package/dist/get-words-De8YIU0J.d.mts.map +1 -0
- package/dist/get-words-IF97Rpfr.cjs +1 -0
- package/dist/get-words-vlruPM_Q.mjs +2 -0
- package/dist/get-words-vlruPM_Q.mjs.map +1 -0
- package/dist/get-words.cjs +1 -13
- package/dist/get-words.d.cts +2 -0
- package/dist/get-words.d.mts +2 -0
- package/dist/get-words.mjs +1 -1
- package/dist/index.cjs +1 -302
- package/dist/index.d.cts +28 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.mjs +1 -1
- package/dist/kebab-case-CT-vTX1k.mjs +2 -0
- package/dist/kebab-case-CT-vTX1k.mjs.map +1 -0
- package/dist/kebab-case-P86ZRHrn.cjs +1 -0
- package/dist/{kebab-case.d.ts → kebab-case-j61N8v5l.d.cts} +6 -2
- package/dist/kebab-case-j61N8v5l.d.cts.map +1 -0
- package/dist/kebab-case-pl--iN9P.d.mts +24 -0
- package/dist/kebab-case-pl--iN9P.d.mts.map +1 -0
- package/dist/kebab-case.cjs +1 -16
- package/dist/kebab-case.d.cts +2 -0
- package/dist/kebab-case.d.mts +2 -0
- package/dist/kebab-case.mjs +1 -1
- package/dist/lower-case-first-BSnwPTwZ.d.cts +14 -0
- package/dist/lower-case-first-BSnwPTwZ.d.cts.map +1 -0
- package/dist/lower-case-first-CES45S2D.cjs +1 -0
- package/dist/lower-case-first-CVRU3SQT.mjs +2 -0
- package/dist/lower-case-first-CVRU3SQT.mjs.map +1 -0
- package/dist/lower-case-first-_dvT-gH7.d.mts +14 -0
- package/dist/lower-case-first-_dvT-gH7.d.mts.map +1 -0
- package/dist/lower-case-first.cjs +1 -9
- package/dist/lower-case-first.d.cts +2 -0
- package/dist/lower-case-first.d.mts +2 -0
- package/dist/lower-case-first.mjs +1 -1
- package/dist/{normalize-email.d.ts → normalize-email-BGivsxZI.d.cts} +5 -1
- package/dist/normalize-email-BGivsxZI.d.cts.map +1 -0
- package/dist/normalize-email-DRezSgOV.cjs +1 -0
- package/dist/normalize-email-bfhnC3KA.d.mts +20 -0
- package/dist/normalize-email-bfhnC3KA.d.mts.map +1 -0
- package/dist/normalize-email-us4o_m-8.mjs +2 -0
- package/dist/normalize-email-us4o_m-8.mjs.map +1 -0
- package/dist/normalize-email.cjs +1 -19
- package/dist/normalize-email.d.cts +2 -0
- package/dist/normalize-email.d.mts +2 -0
- package/dist/normalize-email.mjs +1 -1
- package/dist/package-BSidq8g2.mjs +2 -0
- package/dist/package-BSidq8g2.mjs.map +1 -0
- package/dist/package-Cw2gkIBD.cjs +1 -0
- package/dist/{package.d.ts → package-dwE_olpo.d.mts} +8 -4
- package/dist/package-dwE_olpo.d.mts.map +1 -0
- package/dist/package-o2QJauB-.d.cts +112 -0
- package/dist/package-o2QJauB-.d.cts.map +1 -0
- package/dist/package.cjs +1 -21
- package/dist/package.d.cts +2 -0
- package/dist/package.d.mts +2 -0
- package/dist/package.mjs +1 -1
- package/dist/pad-7O_mbugy.cjs +1 -0
- package/dist/pad-B___Grg_.mjs +2 -0
- package/dist/pad-B___Grg_.mjs.map +1 -0
- package/dist/{pad.d.ts → pad-C-Y_3U-y.d.cts} +5 -1
- package/dist/pad-C-Y_3U-y.d.cts.map +1 -0
- package/dist/pad-mujSKqwW.d.mts +22 -0
- package/dist/pad-mujSKqwW.d.mts.map +1 -0
- package/dist/pad.cjs +1 -9
- package/dist/pad.d.cts +2 -0
- package/dist/pad.d.mts +2 -0
- package/dist/pad.mjs +1 -1
- package/dist/pascal-case-BNtNlP7E.mjs +2 -0
- package/dist/pascal-case-BNtNlP7E.mjs.map +1 -0
- package/dist/pascal-case-BQIXhOgM.cjs +1 -0
- package/dist/{pascal-case.d.ts → pascal-case-DpwdMyIR.d.mts} +6 -2
- package/dist/pascal-case-DpwdMyIR.d.mts.map +1 -0
- package/dist/pascal-case-KPXemzHF.d.cts +24 -0
- package/dist/pascal-case-KPXemzHF.d.cts.map +1 -0
- package/dist/pascal-case.cjs +1 -15
- package/dist/pascal-case.d.cts +2 -0
- package/dist/pascal-case.d.mts +2 -0
- package/dist/pascal-case.mjs +1 -1
- package/dist/period-split-BN6zXi_S.cjs +1 -0
- package/dist/{period-split.d.ts → period-split-C2v7R4SQ.d.cts} +6 -2
- package/dist/period-split-C2v7R4SQ.d.cts.map +1 -0
- package/dist/period-split-CBVGYrUw.d.mts +24 -0
- package/dist/period-split-CBVGYrUw.d.mts.map +1 -0
- package/dist/period-split-PMoklYb7.mjs +2 -0
- package/dist/period-split-PMoklYb7.mjs.map +1 -0
- package/dist/period-split.cjs +1 -17
- package/dist/period-split.d.cts +2 -0
- package/dist/period-split.d.mts +2 -0
- package/dist/period-split.mjs +1 -1
- package/dist/prepositions-BOeFQ28J.mjs +2 -0
- package/dist/prepositions-BOeFQ28J.mjs.map +1 -0
- package/dist/prepositions-Bp1VMgpn.cjs +1 -0
- package/dist/prepositions-By1zoaRG.d.cts +5 -0
- package/dist/prepositions-By1zoaRG.d.cts.map +1 -0
- package/dist/prepositions-DHokBFOW.d.mts +5 -0
- package/dist/prepositions-DHokBFOW.d.mts.map +1 -0
- package/dist/prepositions.cjs +1 -7
- package/dist/prepositions.d.cts +2 -0
- package/dist/prepositions.d.mts +2 -0
- package/dist/prepositions.mjs +1 -1
- package/dist/pretty-bytes-Dam2n54B.d.mts +152 -0
- package/dist/pretty-bytes-Dam2n54B.d.mts.map +1 -0
- package/dist/pretty-bytes-DmvsumO5.mjs +2 -0
- package/dist/pretty-bytes-DmvsumO5.mjs.map +1 -0
- package/dist/pretty-bytes-Dv8t5D6N.d.cts +152 -0
- package/dist/pretty-bytes-Dv8t5D6N.d.cts.map +1 -0
- package/dist/pretty-bytes-aHFwwFbw.cjs +1 -0
- package/dist/pretty-bytes.cjs +1 -48
- package/dist/pretty-bytes.d.cts +2 -0
- package/dist/pretty-bytes.d.mts +2 -0
- package/dist/pretty-bytes.mjs +1 -1
- package/dist/{snake-case.d.ts → snake-case-C5v7aTGP.d.cts} +8 -4
- package/dist/snake-case-C5v7aTGP.d.cts.map +1 -0
- package/dist/snake-case-CKf8oDuS.d.mts +28 -0
- package/dist/snake-case-CKf8oDuS.d.mts.map +1 -0
- package/dist/snake-case.cjs +1 -22
- package/dist/snake-case.d.cts +2 -0
- package/dist/snake-case.d.mts +2 -0
- package/dist/snake-case.mjs +1 -1
- package/dist/special-cases-Ab3-SD5v.d.cts +5 -0
- package/dist/special-cases-Ab3-SD5v.d.cts.map +1 -0
- package/dist/special-cases-CfBSDTk8.cjs +1 -0
- package/dist/special-cases-D7iFXvkR.d.mts +5 -0
- package/dist/special-cases-D7iFXvkR.d.mts.map +1 -0
- package/dist/special-cases-gNNOSEbK.mjs +2 -0
- package/dist/special-cases-gNNOSEbK.mjs.map +1 -0
- package/dist/special-cases.cjs +1 -7
- package/dist/special-cases.d.cts +2 -0
- package/dist/special-cases.d.mts +2 -0
- package/dist/special-cases.mjs +1 -1
- package/dist/{start-case.d.ts → start-case-B9JLArn_.d.mts} +6 -2
- package/dist/start-case-B9JLArn_.d.mts.map +1 -0
- package/dist/start-case-CbdCqiBN.mjs +2 -0
- package/dist/start-case-CbdCqiBN.mjs.map +1 -0
- package/dist/start-case-ChU_5Pyw.cjs +1 -0
- package/dist/start-case-CsYY3Ed4.d.cts +32 -0
- package/dist/start-case-CsYY3Ed4.d.cts.map +1 -0
- package/dist/start-case.cjs +1 -18
- package/dist/start-case.d.cts +2 -0
- package/dist/start-case.d.mts +2 -0
- package/dist/start-case.mjs +1 -1
- package/dist/strip-indents-CPW83oCs.cjs +3 -0
- package/dist/strip-indents-D2-u4Zmx.mjs +4 -0
- package/dist/strip-indents-D2-u4Zmx.mjs.map +1 -0
- package/dist/{strip-indents.d.ts → strip-indents-DBLDecNL.d.cts} +5 -1
- package/dist/strip-indents-DBLDecNL.d.cts.map +1 -0
- package/dist/strip-indents-Dtn3rr-P.d.mts +21 -0
- package/dist/strip-indents-Dtn3rr-P.d.mts.map +1 -0
- package/dist/strip-indents.cjs +1 -11
- package/dist/strip-indents.d.cts +2 -0
- package/dist/strip-indents.d.mts +2 -0
- package/dist/strip-indents.mjs +1 -3
- package/dist/title-case-B_fyCnko.cjs +1 -0
- package/dist/title-case-Cx3FA_Rw.d.mts +15 -0
- package/dist/title-case-Cx3FA_Rw.d.mts.map +1 -0
- package/dist/title-case-DHhN2pBE.mjs +2 -0
- package/dist/title-case-DHhN2pBE.mjs.map +1 -0
- package/dist/title-case-mvtRcmDU.d.cts +15 -0
- package/dist/title-case-mvtRcmDU.d.cts.map +1 -0
- package/dist/title-case.cjs +1 -13
- package/dist/title-case.d.cts +2 -0
- package/dist/title-case.d.mts +2 -0
- package/dist/title-case.mjs +1 -1
- package/dist/{unescape.d.ts → unescape-5MrwINOf.d.cts} +5 -1
- package/dist/unescape-5MrwINOf.d.cts.map +1 -0
- package/dist/unescape-9cS7rNT5.d.mts +20 -0
- package/dist/unescape-9cS7rNT5.d.mts.map +1 -0
- package/dist/unescape-CKwnSwBD.mjs +2 -0
- package/dist/unescape-CKwnSwBD.mjs.map +1 -0
- package/dist/unescape-Ck5lwccz.cjs +1 -0
- package/dist/unescape.cjs +1 -16
- package/dist/unescape.d.cts +2 -0
- package/dist/unescape.d.mts +2 -0
- package/dist/unescape.mjs +1 -1
- package/dist/upper-case-first-Bwfq-lAe.d.mts +14 -0
- package/dist/upper-case-first-Bwfq-lAe.d.mts.map +1 -0
- package/dist/upper-case-first-Ca89zvpr.mjs +2 -0
- package/dist/upper-case-first-Ca89zvpr.mjs.map +1 -0
- package/dist/upper-case-first-IJMSoKjS.cjs +1 -0
- package/dist/upper-case-first-uHFwRCJ8.d.cts +14 -0
- package/dist/upper-case-first-uHFwRCJ8.d.cts.map +1 -0
- package/dist/upper-case-first.cjs +1 -9
- package/dist/upper-case-first.d.cts +2 -0
- package/dist/upper-case-first.d.mts +2 -0
- package/dist/upper-case-first.mjs +1 -1
- package/package.json +87 -409
- package/dist/acronyms.d.ts +0 -13
- package/dist/articles.d.ts +0 -1
- package/dist/combine.d.ts +0 -8
- package/dist/conjunctions.d.ts +0 -1
- package/dist/format-special-cases.d.ts +0 -19
- package/dist/index.d.ts +0 -35
- package/dist/lower-case-first.d.ts +0 -10
- package/dist/prepositions.d.ts +0 -1
- package/dist/pretty-bytes.d.ts +0 -148
- package/dist/special-cases.d.ts +0 -1
- package/dist/title-case.d.ts +0 -9
- package/dist/upper-case-first.d.ts +0 -10
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/start-case.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if the input string is in snake case.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Start case is the naming convention in which each word is written with an initial capital letter - "This Is An Example".
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string to check.
|
|
9
|
+
* @returns True if the input is in start case, false otherwise.
|
|
10
|
+
*/
|
|
11
|
+
declare function isStartCase(input: string | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Start case is the naming convention in which each word is written with an initial capital letter - "This Is An Example".
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const result1 = startCase('hello world'); // result will be 'Hello World'
|
|
21
|
+
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
|
|
22
|
+
* const result3 = startCase('hello-world'); // result will be 'Hello World'
|
|
23
|
+
* const result4 = startCase('hello_world'); // result will be 'Hello World'
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param input - The string to convert.
|
|
27
|
+
* @returns The converted string.
|
|
28
|
+
*/
|
|
29
|
+
declare function startCase<T extends string | undefined>(input?: T): T;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { startCase as n, isStartCase as t };
|
|
32
|
+
//# sourceMappingURL=start-case-CsYY3Ed4.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-case-CsYY3Ed4.d.cts","names":[],"sources":["../src/start-case.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAqBA;;;;;;;iBArBgB,WAAA;;;;;;;;;;;;;;;;;;iBAqBA,gDAAgD,IAAI"}
|
package/dist/start-case.cjs
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isStartCase = isStartCase;
|
|
7
|
-
exports.startCase = startCase;
|
|
8
|
-
var _getWords = require("./get-words.cjs");
|
|
9
|
-
function isStartCase(e) {
|
|
10
|
-
return e ? /^[A-Z][a-z]*(?: [A-Z][a-z]*)*$/.test(e) : !1;
|
|
11
|
-
}
|
|
12
|
-
function startCase(e) {
|
|
13
|
-
if (isStartCase(e) || e === void 0) return e;
|
|
14
|
-
const s = (0, _getWords.getWords)(e.trim());
|
|
15
|
-
let t = "";
|
|
16
|
-
for (const r of s) r && r[0] && (t && (t += " "), t += r === r.toUpperCase() ? r : r[0].toUpperCase() + r.slice(1).toLowerCase());
|
|
17
|
-
return t;
|
|
18
|
-
}
|
|
1
|
+
const e=require(`./start-case-ChU_5Pyw.cjs`);exports.isStartCase=e.t,exports.startCase=e.n;
|
package/dist/start-case.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as e,t}from"./start-case-CbdCqiBN.mjs";export{t as isStartCase,e as startCase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-indents-D2-u4Zmx.mjs","names":[],"sources":["../src/strip-indents.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Removes indents, which is useful for printing warning and messages.\n *\n * @example\n * ```ts\n * stripIndents`\n * Options:\n * - option1\n * - option2\n * `\n * ```\n *\n * @param strings - Template strings\n * @param values - Additional values\n * @returns The stripped string\n */\nexport function stripIndents(\n strings: TemplateStringsArray,\n ...values: any[]\n): string {\n return String.raw(strings, ...values)\n .split(\"\\n\")\n .map(line => line.trim())\n .join(\"\\n\")\n .trim();\n}\n"],"mappings":"AAkCA,SAAgB,EACd,EACA,GAAG,EACK,CACR,OAAO,OAAO,IAAI,EAAS,GAAG,EAAO,CAClC,MAAM;EAAK,CACX,IAAI,GAAQ,EAAK,MAAM,CAAC,CACxB,KAAK;EAAK,CACV,MAAM"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/strip-indents.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Removes indents, which is useful for printing warning and messages.
|
|
3
4
|
*
|
|
@@ -14,4 +15,7 @@
|
|
|
14
15
|
* @param values - Additional values
|
|
15
16
|
* @returns The stripped string
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
declare function stripIndents(strings: TemplateStringsArray, ...values: any[]): string;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { stripIndents as t };
|
|
21
|
+
//# sourceMappingURL=strip-indents-DBLDecNL.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-indents-DBLDecNL.d.cts","names":[],"sources":["../src/strip-indents.ts"],"sourcesContent":[],"mappings":";;AAkCA;;;;;;;;;;;;;;;iBAAgB,YAAA,UACL"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/strip-indents.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Removes indents, which is useful for printing warning and messages.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* stripIndents`
|
|
8
|
+
* Options:
|
|
9
|
+
* - option1
|
|
10
|
+
* - option2
|
|
11
|
+
* `
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param strings - Template strings
|
|
15
|
+
* @param values - Additional values
|
|
16
|
+
* @returns The stripped string
|
|
17
|
+
*/
|
|
18
|
+
declare function stripIndents(strings: TemplateStringsArray, ...values: any[]): string;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { stripIndents as t };
|
|
21
|
+
//# sourceMappingURL=strip-indents-Dtn3rr-P.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-indents-Dtn3rr-P.d.mts","names":[],"sources":["../src/strip-indents.ts"],"sourcesContent":[],"mappings":";;AAkCA;;;;;;;;;;;;;;;iBAAgB,YAAA,UACL"}
|
package/dist/strip-indents.cjs
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.stripIndents = stripIndents;
|
|
7
|
-
function stripIndents(n, ...r) {
|
|
8
|
-
return String.raw(n, ...r).split(`
|
|
9
|
-
`).map(t => t.trim()).join(`
|
|
10
|
-
`).trim();
|
|
11
|
-
}
|
|
1
|
+
const e=require(`./strip-indents-CPW83oCs.cjs`);exports.stripIndents=e.t;
|
package/dist/strip-indents.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./combine-PAQYt88F.cjs`),t=require(`./upper-case-first-IJMSoKjS.cjs`),n=require(`./decamelize-CO4-wIwF.cjs`),r=require(`./format-special-cases-CuctZ76T.cjs`);function i(i,a){return i?.split(/\s+-\s+/).map(i=>n.t(i).split(/[\s\-_]/).map(t.t).map((e,t,n)=>r.t(e,t,n,a)).reduce(e.t)).join(` - `)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as FormatSpecialCasesOptions } from "./format-special-cases-DLTiwMAS.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/title-case.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Convert a string to title case.
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string to convert.
|
|
9
|
+
* @param options - Options for formatting special cases.
|
|
10
|
+
* @returns The title cased string.
|
|
11
|
+
*/
|
|
12
|
+
declare function titleCase<T extends string | undefined>(input: T, options?: FormatSpecialCasesOptions): T;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { titleCase as t };
|
|
15
|
+
//# sourceMappingURL=title-case-Cx3FA_Rw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case-Cx3FA_Rw.d.mts","names":[],"sources":["../src/title-case.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;iBAAgB,+CACP,aACG,4BACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./combine-CAxhmyey.mjs";import{t}from"./upper-case-first-Ca89zvpr.mjs";import{t as n}from"./decamelize-CuI8547m.mjs";import{t as r}from"./format-special-cases-F9O32YcB.mjs";function i(i,a){return i?.split(/\s+-\s+/).map(i=>n(i).split(/[\s\-_]/).map(t).map((e,t,n)=>r(e,t,n,a)).reduce(e)).join(` - `)}export{i as t};
|
|
2
|
+
//# sourceMappingURL=title-case-DHhN2pBE.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case-DHhN2pBE.mjs","names":[],"sources":["../src/title-case.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: FormatSpecialCasesOptions\n): T {\n return input\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n"],"mappings":"gMA+BA,SAAgB,EACd,EACA,EACG,CACH,OAAO,GACH,MAAM,UAAU,CACjB,IAAI,GACH,EAAW,EAAQ,CAChB,MAAM,UAAU,CAChB,IAAI,EAAe,CACnB,KAAK,EAAe,EAAe,IAClC,EAAmB,EAAO,EAAO,EAAO,EAAQ,CACjD,CACA,OAAO,EAAQ,CACnB,CACA,KAAK,MAAM"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as FormatSpecialCasesOptions } from "./format-special-cases-Db69zjlV.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/title-case.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Convert a string to title case.
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string to convert.
|
|
9
|
+
* @param options - Options for formatting special cases.
|
|
10
|
+
* @returns The title cased string.
|
|
11
|
+
*/
|
|
12
|
+
declare function titleCase<T extends string | undefined>(input: T, options?: FormatSpecialCasesOptions): T;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { titleCase as t };
|
|
15
|
+
//# sourceMappingURL=title-case-mvtRcmDU.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case-mvtRcmDU.d.cts","names":[],"sources":["../src/title-case.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;iBAAgB,+CACP,aACG,4BACT"}
|
package/dist/title-case.cjs
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.titleCase = titleCase;
|
|
7
|
-
var _combine = require("./combine.cjs");
|
|
8
|
-
var _decamelize = require("./decamelize.cjs");
|
|
9
|
-
var _formatSpecialCases = require("./format-special-cases.cjs");
|
|
10
|
-
var _upperCaseFirst = require("./upper-case-first.cjs");
|
|
11
|
-
function titleCase(e, r) {
|
|
12
|
-
return e?.split(/\s+-\s+/).map(s => (0, _decamelize.decamelize)(s).split(/[\s\-_]/).map(_upperCaseFirst.upperCaseFirst).map((t, i, m) => (0, _formatSpecialCases.formatSpecialCases)(t, i, m, r)).reduce(_combine.combine)).join(" - ");
|
|
13
|
-
}
|
|
1
|
+
require(`./acronyms-DiyHB1FK.cjs`),require(`./format-special-cases-CuctZ76T.cjs`);const e=require(`./title-case-B_fyCnko.cjs`);exports.titleCase=e.t;
|
package/dist/title-case.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./acronyms-CqHURYjd.mjs";import"./format-special-cases-F9O32YcB.mjs";import{t as e}from"./title-case-DHhN2pBE.mjs";export{e as titleCase};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/unescape.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters.
|
|
3
4
|
* It is the inverse of `escape`.
|
|
@@ -13,4 +14,7 @@
|
|
|
13
14
|
* @param str - The string to unescape.
|
|
14
15
|
* @returns Returns the unescaped string.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
declare function unescape(str: string): string;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { unescape as t };
|
|
20
|
+
//# sourceMappingURL=unescape-5MrwINOf.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unescape-5MrwINOf.d.cts","names":[],"sources":["../src/unescape.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;iBAAgB,QAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/unescape.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters.
|
|
4
|
+
* It is the inverse of `escape`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* unescape('This is a <div> element.'); // returns 'This is a <div> element.'
|
|
9
|
+
* unescape('This is a "quote"'); // returns 'This is a "quote"'
|
|
10
|
+
* unescape('This is a 'quote''); // returns 'This is a 'quote''
|
|
11
|
+
* unescape('This is a & symbol'); // returns 'This is a & symbol'
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param str - The string to unescape.
|
|
15
|
+
* @returns Returns the unescaped string.
|
|
16
|
+
*/
|
|
17
|
+
declare function unescape(str: string): string;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { unescape as t };
|
|
20
|
+
//# sourceMappingURL=unescape-9cS7rNT5.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unescape-9cS7rNT5.d.mts","names":[],"sources":["../src/unescape.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;iBAAgB,QAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unescape-CKwnSwBD.mjs","names":["htmlUnescapes: Record<string, string>"],"sources":["../src/unescape.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst htmlUnescapes: Record<string, string> = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n \""\": '\"',\n \"'\": \"'\"\n};\n\n/**\n * Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters.\n * It is the inverse of `escape`.\n *\n * @example\n * ```ts\n * unescape('This is a <div> element.'); // returns 'This is a <div> element.'\n * unescape('This is a "quote"'); // returns 'This is a \"quote\"'\n * unescape('This is a 'quote''); // returns 'This is a 'quote''\n * unescape('This is a & symbol'); // returns 'This is a & symbol'\n * ```\n *\n * @param str - The string to unescape.\n * @returns Returns the unescaped string.\n */\nexport function unescape(str: string): string {\n return str.replace(\n /&(?:amp|lt|gt|quot|#0*39);/g,\n match => htmlUnescapes[match] || \"'\"\n );\n}\n"],"mappings":"AAkBA,MAAMA,EAAwC,CAC5C,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,QAAS,IACV,CAiBD,SAAgB,EAAS,EAAqB,CAC5C,OAAO,EAAI,QACT,8BACA,GAAS,EAAc,IAAU,IAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`};function t(t){return t.replace(/&(?:amp|lt|gt|quot|#0*39);/g,t=>e[t]||`'`)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
package/dist/unescape.cjs
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.unescape = unescape;
|
|
7
|
-
const e = {
|
|
8
|
-
"&": "&",
|
|
9
|
-
"<": "<",
|
|
10
|
-
">": ">",
|
|
11
|
-
""": '"',
|
|
12
|
-
"'": "'"
|
|
13
|
-
};
|
|
14
|
-
function unescape(t) {
|
|
15
|
-
return t.replace(/&(?:amp|lt|gt|quot|#0*39);/g, n => e[n] || "'");
|
|
16
|
-
}
|
|
1
|
+
const e=require(`./unescape-Ck5lwccz.cjs`);exports.unescape=e.t;
|
package/dist/unescape.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./unescape-CKwnSwBD.mjs";export{e as unescape};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/upper-case-first.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Upper case the first character of an input string.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* "Thisisanexample"
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string.
|
|
9
|
+
* @returns The capitalized string.
|
|
10
|
+
*/
|
|
11
|
+
declare function upperCaseFirst<T extends string | undefined>(input?: T): T;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { upperCaseFirst as t };
|
|
14
|
+
//# sourceMappingURL=upper-case-first-Bwfq-lAe.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case-first-Bwfq-lAe.d.mts","names":[],"sources":["../src/upper-case-first.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;;;iBAAgB,qDAAqD,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case-first-Ca89zvpr.mjs","names":[],"sources":["../src/upper-case-first.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Upper case the first character of an input string.\n *\n * @remarks\n * \"Thisisanexample\"\n *\n * @param input - The input string.\n * @returns The capitalized string.\n */\nexport function upperCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toUpperCase() + input.slice(1) : input) as T;\n}\n"],"mappings":"AA2BA,SAAgB,EAA6C,EAAc,CACzE,OAAQ,GAAQ,EAAM,OAAO,EAAE,CAAC,aAAa,CAAG,EAAM,MAAM,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/upper-case-first.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Upper case the first character of an input string.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* "Thisisanexample"
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string.
|
|
9
|
+
* @returns The capitalized string.
|
|
10
|
+
*/
|
|
11
|
+
declare function upperCaseFirst<T extends string | undefined>(input?: T): T;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { upperCaseFirst as t };
|
|
14
|
+
//# sourceMappingURL=upper-case-first-uHFwRCJ8.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case-first-uHFwRCJ8.d.cts","names":[],"sources":["../src/upper-case-first.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;;;iBAAgB,qDAAqD,IAAI"}
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.upperCaseFirst = upperCaseFirst;
|
|
7
|
-
function upperCaseFirst(e) {
|
|
8
|
-
return e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
9
|
-
}
|
|
1
|
+
const e=require(`./upper-case-first-IJMSoKjS.cjs`);exports.upperCaseFirst=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./upper-case-first-Ca89zvpr.mjs";export{e as upperCaseFirst};
|