@stryke/string-format 0.12.24 → 0.12.26
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 +14 -0
- package/dist/acronyms.cjs +1 -1
- package/dist/acronyms.d.cts +17 -2
- package/dist/acronyms.d.cts.map +1 -0
- package/dist/acronyms.d.mts +17 -2
- package/dist/acronyms.d.mts.map +1 -0
- package/dist/acronyms.mjs +2 -1
- package/dist/acronyms.mjs.map +1 -0
- package/dist/articles.cjs +1 -1
- package/dist/articles.d.cts +5 -2
- package/dist/articles.d.cts.map +1 -0
- package/dist/articles.d.mts +5 -2
- package/dist/articles.d.mts.map +1 -0
- package/dist/articles.mjs +2 -1
- package/dist/articles.mjs.map +1 -0
- package/dist/camel-case.cjs +1 -1
- package/dist/camel-case.d.cts +24 -2
- package/dist/camel-case.d.cts.map +1 -0
- package/dist/camel-case.d.mts +24 -2
- package/dist/camel-case.d.mts.map +1 -0
- package/dist/camel-case.mjs +2 -1
- package/dist/camel-case.mjs.map +1 -0
- package/dist/combine.cjs +1 -1
- package/dist/combine.d.cts +12 -2
- package/dist/combine.d.cts.map +1 -0
- package/dist/combine.d.mts +12 -2
- package/dist/combine.d.mts.map +1 -0
- package/dist/combine.mjs +2 -1
- package/dist/combine.mjs.map +1 -0
- package/dist/conjunctions.cjs +1 -1
- package/dist/conjunctions.d.cts +5 -2
- package/dist/conjunctions.d.cts.map +1 -0
- package/dist/conjunctions.d.mts +5 -2
- package/dist/conjunctions.d.mts.map +1 -0
- package/dist/conjunctions.mjs +2 -1
- package/dist/conjunctions.mjs.map +1 -0
- package/dist/constant-case.cjs +1 -1
- package/dist/constant-case.d.cts +24 -2
- package/dist/constant-case.d.cts.map +1 -0
- package/dist/constant-case.d.mts +24 -2
- package/dist/constant-case.d.mts.map +1 -0
- package/dist/constant-case.mjs +2 -1
- package/dist/constant-case.mjs.map +1 -0
- package/dist/deburr.cjs +1 -1
- package/dist/deburr.d.cts +24 -2
- package/dist/deburr.d.cts.map +1 -0
- package/dist/deburr.d.mts +24 -2
- package/dist/deburr.d.mts.map +1 -0
- package/dist/deburr.mjs +2 -1
- package/dist/deburr.mjs.map +1 -0
- package/dist/decamelize.cjs +1 -1
- package/dist/decamelize.d.cts +11 -2
- package/dist/decamelize.d.cts.map +1 -0
- package/dist/decamelize.d.mts +11 -2
- package/dist/decamelize.d.mts.map +1 -0
- package/dist/decamelize.mjs +2 -1
- package/dist/decamelize.mjs.map +1 -0
- package/dist/escape.cjs +1 -1
- package/dist/escape.d.cts +21 -2
- package/dist/escape.d.cts.map +1 -0
- package/dist/escape.d.mts +21 -2
- package/dist/escape.d.mts.map +1 -0
- package/dist/escape.mjs +2 -1
- package/dist/escape.mjs.map +1 -0
- package/dist/format-special-cases.cjs +1 -1
- package/dist/format-special-cases.d.cts +23 -2
- package/dist/format-special-cases.d.cts.map +1 -0
- package/dist/format-special-cases.d.mts +23 -2
- package/dist/format-special-cases.d.mts.map +1 -0
- package/dist/format-special-cases.mjs +2 -1
- package/dist/format-special-cases.mjs.map +1 -0
- package/dist/get-words.cjs +1 -1
- package/dist/get-words.d.cts +47 -2
- package/dist/get-words.d.cts.map +1 -0
- package/dist/get-words.d.mts +47 -2
- package/dist/get-words.d.mts.map +1 -0
- package/dist/get-words.mjs +2 -1
- package/dist/get-words.mjs.map +1 -0
- package/dist/{deburr-Ct9BIF1O.mjs → helpers/src/remove-accents.cjs} +1 -2
- package/dist/{deburr-ulWvJuGq.cjs → helpers/src/remove-accents.mjs} +2 -1
- package/dist/helpers/src/remove-accents.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +27 -27
- package/dist/index.d.mts +27 -27
- package/dist/index.mjs +1 -1
- package/dist/kebab-case.cjs +1 -1
- package/dist/kebab-case.d.cts +24 -2
- package/dist/kebab-case.d.cts.map +1 -0
- package/dist/kebab-case.d.mts +24 -2
- package/dist/kebab-case.d.mts.map +1 -0
- package/dist/kebab-case.mjs +2 -1
- package/dist/kebab-case.mjs.map +1 -0
- package/dist/lower-case-first.cjs +1 -1
- package/dist/lower-case-first.d.cts +14 -2
- package/dist/lower-case-first.d.cts.map +1 -0
- package/dist/lower-case-first.d.mts +14 -2
- package/dist/lower-case-first.d.mts.map +1 -0
- package/dist/lower-case-first.mjs +2 -1
- package/dist/lower-case-first.mjs.map +1 -0
- package/dist/normalize-email.cjs +1 -1
- package/dist/normalize-email.d.cts +20 -2
- package/dist/normalize-email.d.cts.map +1 -0
- package/dist/normalize-email.d.mts +20 -2
- package/dist/normalize-email.d.mts.map +1 -0
- package/dist/normalize-email.mjs +2 -1
- package/dist/normalize-email.mjs.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.d.cts +112 -2
- package/dist/package.d.cts.map +1 -0
- package/dist/package.d.mts +112 -2
- package/dist/package.d.mts.map +1 -0
- package/dist/package.mjs +2 -1
- package/dist/package.mjs.map +1 -0
- package/dist/pad.cjs +1 -1
- package/dist/pad.d.cts +22 -2
- package/dist/pad.d.cts.map +1 -0
- package/dist/pad.d.mts +22 -2
- package/dist/pad.d.mts.map +1 -0
- package/dist/pad.mjs +2 -1
- package/dist/pad.mjs.map +1 -0
- package/dist/pascal-case.cjs +1 -1
- package/dist/pascal-case.d.cts +24 -2
- package/dist/pascal-case.d.cts.map +1 -0
- package/dist/pascal-case.d.mts +24 -2
- package/dist/pascal-case.d.mts.map +1 -0
- package/dist/pascal-case.mjs +2 -1
- package/dist/pascal-case.mjs.map +1 -0
- package/dist/period-split.cjs +1 -1
- package/dist/period-split.d.cts +24 -2
- package/dist/period-split.d.cts.map +1 -0
- package/dist/period-split.d.mts +24 -2
- package/dist/period-split.d.mts.map +1 -0
- package/dist/period-split.mjs +2 -1
- package/dist/period-split.mjs.map +1 -0
- package/dist/prepositions.cjs +1 -1
- package/dist/prepositions.d.cts +5 -2
- package/dist/prepositions.d.cts.map +1 -0
- package/dist/prepositions.d.mts +5 -2
- package/dist/prepositions.d.mts.map +1 -0
- package/dist/prepositions.mjs +2 -1
- package/dist/prepositions.mjs.map +1 -0
- package/dist/pretty-bytes.cjs +1 -1
- package/dist/pretty-bytes.d.cts +152 -2
- package/dist/pretty-bytes.d.cts.map +1 -0
- package/dist/pretty-bytes.d.mts +152 -2
- package/dist/pretty-bytes.d.mts.map +1 -0
- package/dist/pretty-bytes.mjs +2 -1
- package/dist/pretty-bytes.mjs.map +1 -0
- package/dist/snake-case.cjs +1 -1
- package/dist/snake-case.d.cts +28 -2
- package/dist/snake-case.d.cts.map +1 -0
- package/dist/snake-case.d.mts +28 -2
- package/dist/snake-case.d.mts.map +1 -0
- package/dist/snake-case.mjs +2 -1
- package/dist/snake-case.mjs.map +1 -0
- package/dist/special-cases.cjs +1 -1
- package/dist/special-cases.d.cts +5 -2
- package/dist/special-cases.d.cts.map +1 -0
- package/dist/special-cases.d.mts +5 -2
- package/dist/special-cases.d.mts.map +1 -0
- package/dist/special-cases.mjs +2 -1
- package/dist/special-cases.mjs.map +1 -0
- package/dist/start-case.cjs +1 -1
- package/dist/start-case.d.cts +32 -2
- package/dist/start-case.d.cts.map +1 -0
- package/dist/start-case.d.mts +32 -2
- package/dist/start-case.d.mts.map +1 -0
- package/dist/start-case.mjs +2 -1
- package/dist/start-case.mjs.map +1 -0
- package/dist/strip-indents.cjs +3 -1
- package/dist/strip-indents.d.cts +21 -2
- package/dist/strip-indents.d.cts.map +1 -0
- package/dist/strip-indents.d.mts +21 -2
- package/dist/strip-indents.d.mts.map +1 -0
- package/dist/strip-indents.mjs +4 -1
- package/dist/strip-indents.mjs.map +1 -0
- package/dist/title-case.cjs +1 -1
- package/dist/title-case.d.cts +15 -2
- package/dist/title-case.d.cts.map +1 -0
- package/dist/title-case.d.mts +15 -2
- package/dist/title-case.d.mts.map +1 -0
- package/dist/title-case.mjs +2 -1
- package/dist/title-case.mjs.map +1 -0
- package/dist/types/src/base.cjs +1 -0
- package/dist/types/src/base.mjs +2 -0
- package/dist/types/src/base.mjs.map +1 -0
- package/dist/unescape.cjs +1 -1
- package/dist/unescape.d.cts +20 -2
- package/dist/unescape.d.cts.map +1 -0
- package/dist/unescape.d.mts +20 -2
- package/dist/unescape.d.mts.map +1 -0
- package/dist/unescape.mjs +2 -1
- package/dist/unescape.mjs.map +1 -0
- package/dist/upper-case-first.cjs +1 -1
- package/dist/upper-case-first.d.cts +14 -2
- package/dist/upper-case-first.d.cts.map +1 -0
- package/dist/upper-case-first.d.mts +14 -2
- package/dist/upper-case-first.d.mts.map +1 -0
- package/dist/upper-case-first.mjs +2 -1
- package/dist/upper-case-first.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/acronyms-Clf_sxuQ.d.mts +0 -17
- package/dist/acronyms-Clf_sxuQ.d.mts.map +0 -1
- package/dist/acronyms-CqHURYjd.mjs +0 -2
- package/dist/acronyms-CqHURYjd.mjs.map +0 -1
- package/dist/acronyms-D4QIJv0a.d.cts +0 -17
- package/dist/acronyms-D4QIJv0a.d.cts.map +0 -1
- package/dist/acronyms-DiyHB1FK.cjs +0 -1
- package/dist/articles-Cla7DH2n.d.mts +0 -5
- package/dist/articles-Cla7DH2n.d.mts.map +0 -1
- package/dist/articles-D9xvmhoM.cjs +0 -1
- package/dist/articles-DzjpMs-D.d.cts +0 -5
- package/dist/articles-DzjpMs-D.d.cts.map +0 -1
- package/dist/articles-Dzsbtfwj.mjs +0 -2
- package/dist/articles-Dzsbtfwj.mjs.map +0 -1
- package/dist/base-BHbehXQX.mjs +0 -2
- package/dist/base-BHbehXQX.mjs.map +0 -1
- package/dist/base-DdjslzIj.cjs +0 -1
- package/dist/camel-case-BjbgGrxH.d.mts +0 -24
- package/dist/camel-case-BjbgGrxH.d.mts.map +0 -1
- package/dist/camel-case-C05avVyv.cjs +0 -1
- package/dist/camel-case-CZhC2BRe.d.cts +0 -24
- package/dist/camel-case-CZhC2BRe.d.cts.map +0 -1
- package/dist/camel-case-GuOpCLmz.mjs +0 -2
- package/dist/camel-case-GuOpCLmz.mjs.map +0 -1
- package/dist/combine-CAxhmyey.mjs +0 -2
- package/dist/combine-CAxhmyey.mjs.map +0 -1
- package/dist/combine-DZZlBlm_.d.cts +0 -12
- package/dist/combine-DZZlBlm_.d.cts.map +0 -1
- package/dist/combine-PAQYt88F.cjs +0 -1
- package/dist/combine-g1cpXeuj.d.mts +0 -12
- package/dist/combine-g1cpXeuj.d.mts.map +0 -1
- package/dist/conjunctions-B7prVj02.d.mts +0 -5
- package/dist/conjunctions-B7prVj02.d.mts.map +0 -1
- package/dist/conjunctions-CWyOkdmq.mjs +0 -2
- package/dist/conjunctions-CWyOkdmq.mjs.map +0 -1
- package/dist/conjunctions-CaM47PDl.cjs +0 -1
- package/dist/conjunctions-Chb943kG.d.cts +0 -5
- package/dist/conjunctions-Chb943kG.d.cts.map +0 -1
- package/dist/constant-case-B0oTEBjC.cjs +0 -1
- package/dist/constant-case-Cn0OS_D5.mjs +0 -2
- package/dist/constant-case-Cn0OS_D5.mjs.map +0 -1
- package/dist/constant-case-m6XLIpEZ.d.mts +0 -24
- package/dist/constant-case-m6XLIpEZ.d.mts.map +0 -1
- package/dist/constant-case-w4mBqXc4.d.cts +0 -24
- package/dist/constant-case-w4mBqXc4.d.cts.map +0 -1
- package/dist/deburr-Bc41oTWI.d.mts +0 -24
- package/dist/deburr-Bc41oTWI.d.mts.map +0 -1
- package/dist/deburr-Brmq0CIE.d.cts +0 -24
- package/dist/deburr-Brmq0CIE.d.cts.map +0 -1
- package/dist/deburr-Ct9BIF1O.mjs.map +0 -1
- package/dist/decamelize-CO4-wIwF.cjs +0 -1
- package/dist/decamelize-CXxqH9_o.d.mts +0 -11
- package/dist/decamelize-CXxqH9_o.d.mts.map +0 -1
- package/dist/decamelize-CuI8547m.mjs +0 -2
- package/dist/decamelize-CuI8547m.mjs.map +0 -1
- package/dist/decamelize-esVsRIRg.d.cts +0 -11
- package/dist/decamelize-esVsRIRg.d.cts.map +0 -1
- package/dist/escape-C1LTGJQ1.d.cts +0 -21
- package/dist/escape-C1LTGJQ1.d.cts.map +0 -1
- package/dist/escape-C44shywT.d.mts +0 -21
- package/dist/escape-C44shywT.d.mts.map +0 -1
- package/dist/escape-CRoXgV4v.cjs +0 -1
- package/dist/escape-CydJ1P9x.mjs +0 -2
- package/dist/escape-CydJ1P9x.mjs.map +0 -1
- package/dist/format-special-cases-CuctZ76T.cjs +0 -1
- package/dist/format-special-cases-DLTiwMAS.d.mts +0 -23
- package/dist/format-special-cases-DLTiwMAS.d.mts.map +0 -1
- package/dist/format-special-cases-Db69zjlV.d.cts +0 -23
- package/dist/format-special-cases-Db69zjlV.d.cts.map +0 -1
- package/dist/format-special-cases-F9O32YcB.mjs +0 -2
- package/dist/format-special-cases-F9O32YcB.mjs.map +0 -1
- package/dist/get-words-Cdgu0ngS.d.cts +0 -47
- package/dist/get-words-Cdgu0ngS.d.cts.map +0 -1
- package/dist/get-words-De8YIU0J.d.mts +0 -47
- package/dist/get-words-De8YIU0J.d.mts.map +0 -1
- package/dist/get-words-IF97Rpfr.cjs +0 -1
- package/dist/get-words-vlruPM_Q.mjs +0 -2
- package/dist/get-words-vlruPM_Q.mjs.map +0 -1
- package/dist/kebab-case-CT-vTX1k.mjs +0 -2
- package/dist/kebab-case-CT-vTX1k.mjs.map +0 -1
- package/dist/kebab-case-P86ZRHrn.cjs +0 -1
- package/dist/kebab-case-j61N8v5l.d.cts +0 -24
- package/dist/kebab-case-j61N8v5l.d.cts.map +0 -1
- package/dist/kebab-case-pl--iN9P.d.mts +0 -24
- package/dist/kebab-case-pl--iN9P.d.mts.map +0 -1
- package/dist/lower-case-first-BSnwPTwZ.d.cts +0 -14
- package/dist/lower-case-first-BSnwPTwZ.d.cts.map +0 -1
- package/dist/lower-case-first-CES45S2D.cjs +0 -1
- package/dist/lower-case-first-CVRU3SQT.mjs +0 -2
- package/dist/lower-case-first-CVRU3SQT.mjs.map +0 -1
- package/dist/lower-case-first-_dvT-gH7.d.mts +0 -14
- package/dist/lower-case-first-_dvT-gH7.d.mts.map +0 -1
- package/dist/normalize-email-BGivsxZI.d.cts +0 -20
- package/dist/normalize-email-BGivsxZI.d.cts.map +0 -1
- package/dist/normalize-email-DRezSgOV.cjs +0 -1
- package/dist/normalize-email-bfhnC3KA.d.mts +0 -20
- package/dist/normalize-email-bfhnC3KA.d.mts.map +0 -1
- package/dist/normalize-email-us4o_m-8.mjs +0 -2
- package/dist/normalize-email-us4o_m-8.mjs.map +0 -1
- package/dist/package-BSidq8g2.mjs +0 -2
- package/dist/package-BSidq8g2.mjs.map +0 -1
- package/dist/package-Cw2gkIBD.cjs +0 -1
- package/dist/package-dwE_olpo.d.mts +0 -112
- package/dist/package-dwE_olpo.d.mts.map +0 -1
- package/dist/package-o2QJauB-.d.cts +0 -112
- package/dist/package-o2QJauB-.d.cts.map +0 -1
- package/dist/pad-7O_mbugy.cjs +0 -1
- package/dist/pad-B___Grg_.mjs +0 -2
- package/dist/pad-B___Grg_.mjs.map +0 -1
- package/dist/pad-C-Y_3U-y.d.cts +0 -22
- package/dist/pad-C-Y_3U-y.d.cts.map +0 -1
- package/dist/pad-mujSKqwW.d.mts +0 -22
- package/dist/pad-mujSKqwW.d.mts.map +0 -1
- package/dist/pascal-case-BNtNlP7E.mjs +0 -2
- package/dist/pascal-case-BNtNlP7E.mjs.map +0 -1
- package/dist/pascal-case-BQIXhOgM.cjs +0 -1
- package/dist/pascal-case-DpwdMyIR.d.mts +0 -24
- package/dist/pascal-case-DpwdMyIR.d.mts.map +0 -1
- package/dist/pascal-case-KPXemzHF.d.cts +0 -24
- package/dist/pascal-case-KPXemzHF.d.cts.map +0 -1
- package/dist/period-split-BN6zXi_S.cjs +0 -1
- package/dist/period-split-C2v7R4SQ.d.cts +0 -24
- package/dist/period-split-C2v7R4SQ.d.cts.map +0 -1
- package/dist/period-split-CBVGYrUw.d.mts +0 -24
- package/dist/period-split-CBVGYrUw.d.mts.map +0 -1
- package/dist/period-split-PMoklYb7.mjs +0 -2
- package/dist/period-split-PMoklYb7.mjs.map +0 -1
- package/dist/prepositions-BOeFQ28J.mjs +0 -2
- package/dist/prepositions-BOeFQ28J.mjs.map +0 -1
- package/dist/prepositions-Bp1VMgpn.cjs +0 -1
- package/dist/prepositions-By1zoaRG.d.cts +0 -5
- package/dist/prepositions-By1zoaRG.d.cts.map +0 -1
- package/dist/prepositions-DHokBFOW.d.mts +0 -5
- package/dist/prepositions-DHokBFOW.d.mts.map +0 -1
- package/dist/pretty-bytes-Dam2n54B.d.mts +0 -152
- package/dist/pretty-bytes-Dam2n54B.d.mts.map +0 -1
- package/dist/pretty-bytes-DmvsumO5.mjs +0 -2
- package/dist/pretty-bytes-DmvsumO5.mjs.map +0 -1
- package/dist/pretty-bytes-Dv8t5D6N.d.cts +0 -152
- package/dist/pretty-bytes-Dv8t5D6N.d.cts.map +0 -1
- package/dist/pretty-bytes-aHFwwFbw.cjs +0 -1
- package/dist/snake-case-C5v7aTGP.d.cts +0 -28
- package/dist/snake-case-C5v7aTGP.d.cts.map +0 -1
- package/dist/snake-case-CKf8oDuS.d.mts +0 -28
- package/dist/snake-case-CKf8oDuS.d.mts.map +0 -1
- package/dist/special-cases-Ab3-SD5v.d.cts +0 -5
- package/dist/special-cases-Ab3-SD5v.d.cts.map +0 -1
- package/dist/special-cases-CfBSDTk8.cjs +0 -1
- package/dist/special-cases-D7iFXvkR.d.mts +0 -5
- package/dist/special-cases-D7iFXvkR.d.mts.map +0 -1
- package/dist/special-cases-gNNOSEbK.mjs +0 -2
- package/dist/special-cases-gNNOSEbK.mjs.map +0 -1
- package/dist/start-case-B9JLArn_.d.mts +0 -32
- package/dist/start-case-B9JLArn_.d.mts.map +0 -1
- package/dist/start-case-CbdCqiBN.mjs +0 -2
- package/dist/start-case-CbdCqiBN.mjs.map +0 -1
- package/dist/start-case-ChU_5Pyw.cjs +0 -1
- package/dist/start-case-CsYY3Ed4.d.cts +0 -32
- package/dist/start-case-CsYY3Ed4.d.cts.map +0 -1
- package/dist/strip-indents-CPW83oCs.cjs +0 -3
- package/dist/strip-indents-D2-u4Zmx.mjs +0 -4
- package/dist/strip-indents-D2-u4Zmx.mjs.map +0 -1
- package/dist/strip-indents-DBLDecNL.d.cts +0 -21
- package/dist/strip-indents-DBLDecNL.d.cts.map +0 -1
- package/dist/strip-indents-Dtn3rr-P.d.mts +0 -21
- package/dist/strip-indents-Dtn3rr-P.d.mts.map +0 -1
- package/dist/title-case-B_fyCnko.cjs +0 -1
- package/dist/title-case-Cx3FA_Rw.d.mts +0 -15
- package/dist/title-case-Cx3FA_Rw.d.mts.map +0 -1
- package/dist/title-case-DHhN2pBE.mjs +0 -2
- package/dist/title-case-DHhN2pBE.mjs.map +0 -1
- package/dist/title-case-mvtRcmDU.d.cts +0 -15
- package/dist/title-case-mvtRcmDU.d.cts.map +0 -1
- package/dist/unescape-5MrwINOf.d.cts +0 -20
- package/dist/unescape-5MrwINOf.d.cts.map +0 -1
- package/dist/unescape-9cS7rNT5.d.mts +0 -20
- package/dist/unescape-9cS7rNT5.d.mts.map +0 -1
- package/dist/unescape-CKwnSwBD.mjs +0 -2
- package/dist/unescape-CKwnSwBD.mjs.map +0 -1
- package/dist/unescape-Ck5lwccz.cjs +0 -1
- package/dist/upper-case-first-Bwfq-lAe.d.mts +0 -14
- package/dist/upper-case-first-Bwfq-lAe.d.mts.map +0 -1
- package/dist/upper-case-first-Ca89zvpr.mjs +0 -2
- package/dist/upper-case-first-Ca89zvpr.mjs.map +0 -1
- package/dist/upper-case-first-IJMSoKjS.cjs +0 -1
- package/dist/upper-case-first-uHFwRCJ8.d.cts +0 -14
- package/dist/upper-case-first-uHFwRCJ8.d.cts.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region src/format-special-cases.d.ts
|
|
2
|
-
interface FormatSpecialCasesOptions {
|
|
3
|
-
/**
|
|
4
|
-
* If true, use the descriptions from the acronym list instead of the display names.
|
|
5
|
-
*
|
|
6
|
-
* @defaultValue true
|
|
7
|
-
*/
|
|
8
|
-
useDescriptions?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Handle special words in a title.
|
|
12
|
-
*
|
|
13
|
-
* @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case
|
|
14
|
-
*
|
|
15
|
-
* @param value - The word to handle
|
|
16
|
-
* @param index - The index of the word in the title
|
|
17
|
-
* @param words - The full title as an array of words
|
|
18
|
-
* @returns The formatted word
|
|
19
|
-
*/
|
|
20
|
-
declare function formatSpecialCases(value: string, index: number, words: string[], options?: FormatSpecialCasesOptions): string;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { formatSpecialCases as n, FormatSpecialCasesOptions as t };
|
|
23
|
-
//# sourceMappingURL=format-special-cases-DLTiwMAS.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-special-cases-DLTiwMAS.d.mts","names":[],"sources":["../src/format-special-cases.ts"],"sourcesContent":[],"mappings":";UAwBiB,yBAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,kBAAA,0DAIJ"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region src/format-special-cases.d.ts
|
|
2
|
-
interface FormatSpecialCasesOptions {
|
|
3
|
-
/**
|
|
4
|
-
* If true, use the descriptions from the acronym list instead of the display names.
|
|
5
|
-
*
|
|
6
|
-
* @defaultValue true
|
|
7
|
-
*/
|
|
8
|
-
useDescriptions?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Handle special words in a title.
|
|
12
|
-
*
|
|
13
|
-
* @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case
|
|
14
|
-
*
|
|
15
|
-
* @param value - The word to handle
|
|
16
|
-
* @param index - The index of the word in the title
|
|
17
|
-
* @param words - The full title as an array of words
|
|
18
|
-
* @returns The formatted word
|
|
19
|
-
*/
|
|
20
|
-
declare function formatSpecialCases(value: string, index: number, words: string[], options?: FormatSpecialCasesOptions): string;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { formatSpecialCases as n, FormatSpecialCasesOptions as t };
|
|
23
|
-
//# sourceMappingURL=format-special-cases-Db69zjlV.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-special-cases-Db69zjlV.d.cts","names":[],"sources":["../src/format-special-cases.ts"],"sourcesContent":[],"mappings":";UAwBiB,yBAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,kBAAA,0DAIJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./acronyms-CqHURYjd.mjs";import{t}from"./articles-Dzsbtfwj.mjs";import{t as n}from"./conjunctions-CWyOkdmq.mjs";import{t as r}from"./prepositions-BOeFQ28J.mjs";import{t as i}from"./special-cases-gNNOSEbK.mjs";function a(a,o,s,c){let l=a.toLowerCase(),u=a.toUpperCase();for(let e of i)if(e.toLowerCase()===l)return e;return e[u]?c?.useDescriptions===!1?e[u].display||u:e[u].description:o===0||o===s.length-1||a.length>=4?a:r.includes(l)||n.includes(l)||t.includes(l)?l:a}export{a as t};
|
|
2
|
-
//# sourceMappingURL=format-special-cases-F9O32YcB.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-special-cases-F9O32YcB.mjs","names":[],"sources":["../src/format-special-cases.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 { ACRONYMS } from \"./acronyms\";\nimport { ARTICLES } from \"./articles\";\nimport { CONJUNCTIONS } from \"./conjunctions\";\nimport { PREPOSITIONS } from \"./prepositions\";\nimport { SPECIAL_CASES } from \"./special-cases\";\n\nexport interface FormatSpecialCasesOptions {\n /**\n * If true, use the descriptions from the acronym list instead of the display names.\n *\n * @defaultValue true\n */\n useDescriptions?: boolean;\n}\n\n/**\n * Handle special words in a title.\n *\n * @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case\n *\n * @param value - The word to handle\n * @param index - The index of the word in the title\n * @param words - The full title as an array of words\n * @returns The formatted word\n */\nexport function formatSpecialCases(\n value: string,\n index: number,\n words: string[],\n options?: FormatSpecialCasesOptions\n): string {\n const lowercaseStr = value.toLowerCase();\n const uppercaseStr = value.toUpperCase();\n\n for (const special of SPECIAL_CASES) {\n if (special.toLowerCase() === lowercaseStr) {\n return special;\n }\n }\n\n if (ACRONYMS[uppercaseStr]) {\n return options?.useDescriptions !== false\n ? ACRONYMS[uppercaseStr].description\n : ACRONYMS[uppercaseStr].display || uppercaseStr;\n }\n\n // If the word is the first word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === 0) {\n return value;\n }\n\n // If the word is the last word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === words.length - 1) {\n return value;\n }\n\n // Return the word capitalized if it's 4 characters or more\n if (value.length >= 4) {\n return value;\n }\n\n if (PREPOSITIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (CONJUNCTIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (ARTICLES.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n\n return value;\n}\n"],"mappings":"oOA2CA,SAAgB,EACd,EACA,EACA,EACA,EACQ,CACR,IAAM,EAAe,EAAM,aAAa,CAClC,EAAe,EAAM,aAAa,CAExC,IAAK,IAAM,KAAW,EACpB,GAAI,EAAQ,aAAa,GAAK,EAC5B,OAAO,EAqCX,OAjCI,EAAS,GACJ,GAAS,kBAAoB,GAEhC,EAAS,GAAc,SAAW,EADlC,EAAS,GAAc,YAMzB,IAAU,GAMV,IAAU,EAAM,OAAS,GAKzB,EAAM,QAAU,EACX,EAGL,EAAa,SAAS,EAAa,EAGnC,EAAa,SAAS,EAAa,EAGnC,EAAS,SAAS,EAAa,CAC1B,EAGF"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region src/get-words.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Regular expression pattern to split strings into words for various case conversions
|
|
4
|
-
*
|
|
5
|
-
* This pattern matches sequences of characters in a string, considering the following case:
|
|
6
|
-
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
|
|
7
|
-
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
|
|
8
|
-
* - Single uppercase letters
|
|
9
|
-
* - Sequences of digits
|
|
10
|
-
*
|
|
11
|
-
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
|
|
12
|
-
* a consistent format like snake case.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);
|
|
16
|
-
* // matches: ['camel', 'Case', 'HTTP', 'Request']
|
|
17
|
-
*/
|
|
18
|
-
declare const CASE_SPLIT_PATTERN: RegExp;
|
|
19
|
-
declare const RELAXED_SPLIT_PATTERN: RegExp;
|
|
20
|
-
/**
|
|
21
|
-
* Options for splitting a string into words
|
|
22
|
-
*/
|
|
23
|
-
interface GetWordsOptions {
|
|
24
|
-
/**
|
|
25
|
-
* Whether to use a relaxed splitting pattern
|
|
26
|
-
*/
|
|
27
|
-
relaxed?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Custom regular expression for splitting the string
|
|
30
|
-
*/
|
|
31
|
-
split?: RegExp;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Splits a string into words using a regular expression pattern
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* const words = getWords('camelCaseHTTPRequest');
|
|
38
|
-
* // words: ['camel', 'Case', 'HTTP', 'Request']
|
|
39
|
-
*
|
|
40
|
-
* @param str - The string to split into words
|
|
41
|
-
* @param options - Options for splitting the string
|
|
42
|
-
* @returns An array of words
|
|
43
|
-
*/
|
|
44
|
-
declare function getWords(str: string, options?: GetWordsOptions): string[];
|
|
45
|
-
//#endregion
|
|
46
|
-
export { getWords as i, GetWordsOptions as n, RELAXED_SPLIT_PATTERN as r, CASE_SPLIT_PATTERN as t };
|
|
47
|
-
//# sourceMappingURL=get-words-Cdgu0ngS.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-words-Cdgu0ngS.d.cts","names":[],"sources":["../src/get-words.ts"],"sourcesContent":[],"mappings":";;AAkCA;AAEA;AAMA;AAuBA;;;;;;;;;;;;cA/Ba,oBAAkB;cAElB,uBAAqB;;;;UAMjB,eAAA;;;;;;;;UASP;;;;;;;;;;;;;iBAcM,QAAA,wBAA+B"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region src/get-words.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Regular expression pattern to split strings into words for various case conversions
|
|
4
|
-
*
|
|
5
|
-
* This pattern matches sequences of characters in a string, considering the following case:
|
|
6
|
-
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
|
|
7
|
-
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
|
|
8
|
-
* - Single uppercase letters
|
|
9
|
-
* - Sequences of digits
|
|
10
|
-
*
|
|
11
|
-
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
|
|
12
|
-
* a consistent format like snake case.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);
|
|
16
|
-
* // matches: ['camel', 'Case', 'HTTP', 'Request']
|
|
17
|
-
*/
|
|
18
|
-
declare const CASE_SPLIT_PATTERN: RegExp;
|
|
19
|
-
declare const RELAXED_SPLIT_PATTERN: RegExp;
|
|
20
|
-
/**
|
|
21
|
-
* Options for splitting a string into words
|
|
22
|
-
*/
|
|
23
|
-
interface GetWordsOptions {
|
|
24
|
-
/**
|
|
25
|
-
* Whether to use a relaxed splitting pattern
|
|
26
|
-
*/
|
|
27
|
-
relaxed?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Custom regular expression for splitting the string
|
|
30
|
-
*/
|
|
31
|
-
split?: RegExp;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Splits a string into words using a regular expression pattern
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* const words = getWords('camelCaseHTTPRequest');
|
|
38
|
-
* // words: ['camel', 'Case', 'HTTP', 'Request']
|
|
39
|
-
*
|
|
40
|
-
* @param str - The string to split into words
|
|
41
|
-
* @param options - Options for splitting the string
|
|
42
|
-
* @returns An array of words
|
|
43
|
-
*/
|
|
44
|
-
declare function getWords(str: string, options?: GetWordsOptions): string[];
|
|
45
|
-
//#endregion
|
|
46
|
-
export { getWords as i, GetWordsOptions as n, RELAXED_SPLIT_PATTERN as r, CASE_SPLIT_PATTERN as t };
|
|
47
|
-
//# sourceMappingURL=get-words-De8YIU0J.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-words-De8YIU0J.d.mts","names":[],"sources":["../src/get-words.ts"],"sourcesContent":[],"mappings":";;AAkCA;AAEA;AAMA;AAuBA;;;;;;;;;;;;cA/Ba,oBAAkB;cAElB,uBAAqB;;;;UAMjB,eAAA;;;;;;;;UASP;;;;;;;;;;;;;iBAcM,QAAA,wBAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=/[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g,t=/[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;function n(n,r={}){if(n.length>5e3)throw Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");return[...n.match(r.split??(r.relaxed?t:e))??[]]}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=/[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g,t=/[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;function n(n,r={}){if(n.length>5e3)throw Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");return[...n.match(r.split??(r.relaxed?t:e))??[]]}export{t as n,n as r,e as t};
|
|
2
|
-
//# sourceMappingURL=get-words-vlruPM_Q.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-words-vlruPM_Q.mjs","names":[],"sources":["../src/get-words.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 * Regular expression pattern to split strings into words for various case conversions\n *\n * This pattern matches sequences of characters in a string, considering the following case:\n * - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n * - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n * - Single uppercase letters\n * - Sequences of digits\n *\n * The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n * a consistent format like snake case.\n *\n * @example\n * const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n * // matches: ['camel', 'Case', 'HTTP', 'Request']\n */\nexport const CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\\d+|[A-Z]+(?![a-z])/g;\n\nexport const RELAXED_SPLIT_PATTERN =\n /[A-Z/.-]?[a-z/.-]+|\\d+|[A-Z/.-]+(?![a-z/.-])/g;\n\n/**\n * Options for splitting a string into words\n */\nexport interface GetWordsOptions {\n /**\n * Whether to use a relaxed splitting pattern\n */\n relaxed?: boolean;\n\n /**\n * Custom regular expression for splitting the string\n */\n split?: RegExp;\n}\n\n/**\n * Splits a string into words using a regular expression pattern\n *\n * @example\n * const words = getWords('camelCaseHTTPRequest');\n * // words: ['camel', 'Case', 'HTTP', 'Request']\n *\n * @param str - The string to split into words\n * @param options - Options for splitting the string\n * @returns An array of words\n */\nexport function getWords(str: string, options: GetWordsOptions = {}): string[] {\n if (str.length > 5000) {\n throw new Error(\n \"The regular expression parameter of `get-words` can't handle strings longer than 2000 characters\"\n );\n }\n\n return [\n ...(str.match(\n options.split ??\n (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)\n ) ?? [])\n ];\n}\n"],"mappings":"AAkCA,MAAa,EAAqB,oCAErB,EACX,gDA4BF,SAAgB,EAAS,EAAa,EAA2B,EAAE,CAAY,CAC7E,GAAI,EAAI,OAAS,IACf,MAAU,MACR,mGACD,CAGH,MAAO,CACL,GAAI,EAAI,MACN,EAAQ,QACL,EAAQ,QAAU,EAAwB,GAC9C,EAAI,EAAE,CACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kebab-case-CT-vTX1k.mjs","names":[],"sources":["../src/kebab-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 { getWords } from \"./get-words\";\n\n/**\n * Check if the input string is in kebab case.\n *\n * @remarks\n * Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n *\n * @param input - The input string to check.\n * @returns True if the input is in kebab case, false otherwise.\n */\nexport function isKebabCase(input: string | undefined): boolean {\n return input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;\n}\n\n/**\n * Convert the input string to kebab case.\n *\n * @remarks\n * Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n *\n * @param input - The input string.\n * @returns The kebab-cased string.\n */\nexport function kebabCase<T extends string | undefined>(input: T): T {\n if (isKebabCase(input) || input === undefined) {\n return input;\n }\n\n const parts = input ? getWords(input) : [];\n if (parts.length === 0) {\n return \"\" as T;\n }\n\n return parts.join(\"-\").toLowerCase() as T;\n}\n"],"mappings":"6CA6BA,SAAgB,EAAY,EAAoC,CAC9D,OAAO,EAAQ,0BAA0B,KAAK,EAAM,CAAG,GAYzD,SAAgB,EAAwC,EAAa,CACnE,GAAI,EAAY,EAAM,EAAI,IAAU,IAAA,GAClC,OAAO,EAGT,IAAM,EAAQ,EAAQ,EAAS,EAAM,CAAG,EAAE,CAK1C,OAJI,EAAM,SAAW,EACZ,GAGF,EAAM,KAAK,IAAI,CAAC,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./get-words-IF97Rpfr.cjs`);function t(e){return e?/^[a-z]+(?:-[a-z0-9]+)*$/.test(e):!1}function n(n){if(t(n)||n===void 0)return n;let r=n?e.r(n):[];return r.length===0?``:r.join(`-`).toLowerCase()}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region src/kebab-case.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Check if the input string is in kebab case.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
7
|
-
*
|
|
8
|
-
* @param input - The input string to check.
|
|
9
|
-
* @returns True if the input is in kebab case, false otherwise.
|
|
10
|
-
*/
|
|
11
|
-
declare function isKebabCase(input: string | undefined): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Convert the input string to kebab case.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
17
|
-
*
|
|
18
|
-
* @param input - The input string.
|
|
19
|
-
* @returns The kebab-cased string.
|
|
20
|
-
*/
|
|
21
|
-
declare function kebabCase<T extends string | undefined>(input: T): T;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { kebabCase as n, isKebabCase as t };
|
|
24
|
-
//# sourceMappingURL=kebab-case-j61N8v5l.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kebab-case-j61N8v5l.d.cts","names":[],"sources":["../src/kebab-case.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAaA;;;;;;;iBAbgB,WAAA;;;;;;;;;;iBAaA,+CAA+C,IAAI"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region src/kebab-case.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Check if the input string is in kebab case.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
7
|
-
*
|
|
8
|
-
* @param input - The input string to check.
|
|
9
|
-
* @returns True if the input is in kebab case, false otherwise.
|
|
10
|
-
*/
|
|
11
|
-
declare function isKebabCase(input: string | undefined): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Convert the input string to kebab case.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
17
|
-
*
|
|
18
|
-
* @param input - The input string.
|
|
19
|
-
* @returns The kebab-cased string.
|
|
20
|
-
*/
|
|
21
|
-
declare function kebabCase<T extends string | undefined>(input: T): T;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { kebabCase as n, isKebabCase as t };
|
|
24
|
-
//# sourceMappingURL=kebab-case-pl--iN9P.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kebab-case-pl--iN9P.d.mts","names":[],"sources":["../src/kebab-case.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAaA;;;;;;;iBAbgB,WAAA;;;;;;;;;;iBAaA,+CAA+C,IAAI"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/lower-case-first.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Lower case the first character of an input string.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* "tHISISANEXAMPLE"
|
|
7
|
-
*
|
|
8
|
-
* @param input - The input string.
|
|
9
|
-
* @returns The lower-cased string.
|
|
10
|
-
*/
|
|
11
|
-
declare function lowerCaseFirst<T extends string | undefined>(input?: T): T;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { lowerCaseFirst as t };
|
|
14
|
-
//# sourceMappingURL=lower-case-first-BSnwPTwZ.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lower-case-first-BSnwPTwZ.d.cts","names":[],"sources":["../src/lower-case-first.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;;;iBAAgB,qDAAqD,IAAI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lower-case-first-CVRU3SQT.mjs","names":[],"sources":["../src/lower-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 * Lower case the first character of an input string.\n *\n * @remarks\n * \"tHISISANEXAMPLE\"\n *\n * @param input - The input string.\n * @returns The lower-cased string.\n */\nexport function lowerCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toLowerCase() + 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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/lower-case-first.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Lower case the first character of an input string.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* "tHISISANEXAMPLE"
|
|
7
|
-
*
|
|
8
|
-
* @param input - The input string.
|
|
9
|
-
* @returns The lower-cased string.
|
|
10
|
-
*/
|
|
11
|
-
declare function lowerCaseFirst<T extends string | undefined>(input?: T): T;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { lowerCaseFirst as t };
|
|
14
|
-
//# sourceMappingURL=lower-case-first-_dvT-gH7.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lower-case-first-_dvT-gH7.d.mts","names":[],"sources":["../src/lower-case-first.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;;;iBAAgB,qDAAqD,IAAI"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/normalize-email.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* 1. Lower-cases whole email.
|
|
4
|
-
* 2. Removes dots ".".
|
|
5
|
-
* 3. Remotes name part after "+".
|
|
6
|
-
* 4. Throws if cannot parse the email.
|
|
7
|
-
*
|
|
8
|
-
* For example, this email
|
|
9
|
-
*
|
|
10
|
-
* Mike.Johnson+twitter\@Gmail.com
|
|
11
|
-
*
|
|
12
|
-
* will be normalized to
|
|
13
|
-
*
|
|
14
|
-
* mikejohnson\@gmail.com
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
declare const normalizeEmail: (email: string) => string;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { normalizeEmail as t };
|
|
20
|
-
//# sourceMappingURL=normalize-email-BGivsxZI.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-email-BGivsxZI.d.cts","names":[],"sources":["../src/normalize-email.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;cAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=/\./g,t=t=>{if(!t.includes(`@`)&&!t.includes(`+`))throw Error(`invalid_email_format`);let n=t.split(`@`).filter(Boolean);if(n.length>1)throw Error(`invalid_email_format`);let[r,i]=n,[a]=r.split(`+`);if(!a)throw Error(`invalid_email_format`);return a=a.replace(e,``),`${a.toLowerCase()}@${i.toLowerCase()}`};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/normalize-email.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* 1. Lower-cases whole email.
|
|
4
|
-
* 2. Removes dots ".".
|
|
5
|
-
* 3. Remotes name part after "+".
|
|
6
|
-
* 4. Throws if cannot parse the email.
|
|
7
|
-
*
|
|
8
|
-
* For example, this email
|
|
9
|
-
*
|
|
10
|
-
* Mike.Johnson+twitter\@Gmail.com
|
|
11
|
-
*
|
|
12
|
-
* will be normalized to
|
|
13
|
-
*
|
|
14
|
-
* mikejohnson\@gmail.com
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
declare const normalizeEmail: (email: string) => string;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { normalizeEmail as t };
|
|
20
|
-
//# sourceMappingURL=normalize-email-bfhnC3KA.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-email-bfhnC3KA.d.mts","names":[],"sources":["../src/normalize-email.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;cAAa"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=/\./g,t=t=>{if(!t.includes(`@`)&&!t.includes(`+`))throw Error(`invalid_email_format`);let n=t.split(`@`).filter(Boolean);if(n.length>1)throw Error(`invalid_email_format`);let[r,i]=n,[a]=r.split(`+`);if(!a)throw Error(`invalid_email_format`);return a=a.replace(e,``),`${a.toLowerCase()}@${i.toLowerCase()}`};export{t};
|
|
2
|
-
//# sourceMappingURL=normalize-email-us4o_m-8.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-email-us4o_m-8.mjs","names":[],"sources":["../src/normalize-email.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 DOT_REG = /\\./g;\n\n/**\n * 1. Lower-cases whole email.\n * 2. Removes dots \".\".\n * 3. Remotes name part after \"+\".\n * 4. Throws if cannot parse the email.\n *\n * For example, this email\n *\n * Mike.Johnson+twitter\\@Gmail.com\n *\n * will be normalized to\n *\n * mikejohnson\\@gmail.com\n *\n */\nexport const normalizeEmail = (email: string) => {\n if (!email.includes(\"@\") && !email.includes(\"+\")) {\n throw new Error(\"invalid_email_format\");\n }\n\n const split = email.split(\"@\").filter(Boolean);\n if (split.length > 1) {\n throw new Error(\"invalid_email_format\");\n }\n\n const [name, host] = split;\n\n let [beforePlus] = name!.split(\"+\");\n if (!beforePlus) {\n throw new Error(\"invalid_email_format\");\n }\n\n beforePlus = beforePlus.replace(DOT_REG, \"\");\n const result = `${beforePlus.toLowerCase()}@${host!.toLowerCase()}`;\n Number(result);\n\n return result;\n};\n"],"mappings":"AAkBA,MAAM,EAAU,MAiBH,EAAkB,GAAkB,CAC/C,GAAI,CAAC,EAAM,SAAS,IAAI,EAAI,CAAC,EAAM,SAAS,IAAI,CAC9C,MAAU,MAAM,uBAAuB,CAGzC,IAAM,EAAQ,EAAM,MAAM,IAAI,CAAC,OAAO,QAAQ,CAC9C,GAAI,EAAM,OAAS,EACjB,MAAU,MAAM,uBAAuB,CAGzC,GAAM,CAAC,EAAM,GAAQ,EAEjB,CAAC,GAAc,EAAM,MAAM,IAAI,CACnC,GAAI,CAAC,EACH,MAAU,MAAM,uBAAuB,CAOzC,MAJA,GAAa,EAAW,QAAQ,EAAS,GAAG,CAC7B,GAAG,EAAW,aAAa,CAAC,GAAG,EAAM,aAAa"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(e){return/^.[^\n\r@\u2028\u2029]*@.*$/.test(e)}function t(t){return e(t)?t.substring(0,t.lastIndexOf(`@`)):t}function n(e){return/^[^\n\r/\u2028\u2029]*\/.[^\n\r/\u2028\u2029]*\/.*$/.test(e)?e.substring(0,e.lastIndexOf(`/`)):t(e)}function r(t){return e(t)?t.replace(/^.+@/,``):void 0}export{t as i,r as n,e as r,n as t};
|
|
2
|
-
//# sourceMappingURL=package-BSidq8g2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-BSidq8g2.mjs","names":[],"sources":["../src/package.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 * Check if a package name has a version\n *\n * @example\n * ```typescript\n * hasPackageVersion(\"lodash@4.17.21\");\n * // => true\n * hasPackageVersion(\"@stryke/core@4.17.21\");\n * // => true\n * hasPackageVersion(\"lodash\");\n * // => false\n * hasPackageVersion(\"@stryke/core\");\n * // => false\n * hasPackageVersion(\"lodash/module\");\n * // => false\n * hasPackageVersion(\"@stryke/core/module\");\n * // => false\n * hasPackageVersion(\"lodash/module@4.17.21\");\n * // => true\n * hasPackageVersion(\"@stryke/core/module@4.17.21\");\n * // => true\n * ```\n *\n * @param value - The package name with version\n * @returns Whether the package name has a version\n */\nexport function hasPackageVersion(value: string): boolean {\n return /^.[^\\n\\r@\\u2028\\u2029]*@.*$/.test(value);\n}\n\n/**\n * Remove the version from a package name (if it exists)\n *\n * @example\n * ```typescript\n * removePackageVersion(\"lodash@4.17.21\");\n * // => \"lodash\"\n * removePackageVersion(\"@stryke/core@4.17.21\");\n * // => \"@stryke/core\"\n * removePackageVersion(\"lodash\");\n * // => \"lodash\"\n * removePackageVersion(\"@stryke/core\");\n * // => \"@stryke/core\"\n * getPackageName(\"lodash/module\");\n * // => \"lodash/module\"\n * getPackageName(\"@stryke/core/module\");\n * // => \"@stryke/core/module\"\n * getPackageName(\"lodash/module@4.17.21\");\n * // => \"lodash/module\"\n * getPackageName(\"@stryke/core/module@4.17.21\");\n * // => \"@stryke/core/module\"\n * ```\n *\n * @param value - The package name with version\n * @returns The package name without version\n */\nexport function removePackageVersion(value: string) {\n return hasPackageVersion(value)\n ? value.substring(0, value.lastIndexOf(\"@\"))\n : value;\n}\n\n/**\n * Get the package name from a scoped package string\n *\n * @example\n * ```typescript\n * getPackageName(\"lodash@4.17.21\");\n * // => \"lodash\"\n * getPackageName(\"@stryke/core@4.17.21\");\n * // => \"@stryke/core\"\n * getPackageName(\"lodash\");\n * // => \"lodash\"\n * getPackageName(\"@stryke/core\");\n * // => \"@stryke/core\"\n * getPackageName(\"lodash/module\");\n * // => \"lodash\"\n * getPackageName(\"@stryke/core/module\");\n * // => \"@stryke/core\"\n * getPackageName(\"lodash/module@4.17.21\");\n * // => \"lodash\"\n * getPackageName(\"@stryke/core/module@4.17.21\");\n * // => \"@stryke/core\"\n * ```\n *\n * @param value - The scoped package string\n * @returns The package name without the scope\n */\nexport function getPackageName(value: string) {\n return /^[^\\n\\r/\\u2028\\u2029]*\\/.[^\\n\\r/\\u2028\\u2029]*\\/.*$/.test(value)\n ? value.substring(0, value.lastIndexOf(\"/\"))\n : removePackageVersion(value);\n}\n\n/**\n * Get the package version from a scoped package string\n *\n * @example\n * ```typescript\n * getPackageName(\"lodash@4.17.21\");\n * // => \"4.17.21\"\n * getPackageName(\"@stryke/core@4.17.21\");\n * // => \"4.17.21\"\n * getPackageName(\"lodash\");\n * // => undefined\n * getPackageName(\"@stryke/core\");\n * // => undefined\n * getPackageName(\"lodash/module\");\n * // => undefined\n * getPackageName(\"@stryke/core/module\");\n * // => undefined\n * getPackageName(\"lodash/module@4.17.21\");\n * // => \"4.17.21\"\n * getPackageName(\"@stryke/core/module@4.17.21\");\n * // => \"4.17.21\"\n * ```\n *\n * @param value - The scoped package string\n * @returns The package version without the package name if it exists. If not, returns undefined.\n */\nexport function getPackageVersion(value: string): string | undefined {\n return hasPackageVersion(value) ? value.replace(/^.+@/, \"\") : undefined;\n}\n"],"mappings":"AA4CA,SAAgB,EAAkB,EAAwB,CACxD,MAAO,8BAA8B,KAAK,EAAM,CA6BlD,SAAgB,EAAqB,EAAe,CAClD,OAAO,EAAkB,EAAM,CAC3B,EAAM,UAAU,EAAG,EAAM,YAAY,IAAI,CAAC,CAC1C,EA6BN,SAAgB,EAAe,EAAe,CAC5C,MAAO,sDAAsD,KAAK,EAAM,CACpE,EAAM,UAAU,EAAG,EAAM,YAAY,IAAI,CAAC,CAC1C,EAAqB,EAAM,CA6BjC,SAAgB,EAAkB,EAAmC,CACnE,OAAO,EAAkB,EAAM,CAAG,EAAM,QAAQ,OAAQ,GAAG,CAAG,IAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return/^.[^\n\r@\u2028\u2029]*@.*$/.test(e)}function t(t){return e(t)?t.substring(0,t.lastIndexOf(`@`)):t}function n(e){return/^[^\n\r/\u2028\u2029]*\/.[^\n\r/\u2028\u2029]*\/.*$/.test(e)?e.substring(0,e.lastIndexOf(`/`)):t(e)}function r(t){return e(t)?t.replace(/^.+@/,``):void 0}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
//#region src/package.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Check if a package name has a version
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* hasPackageVersion("lodash@4.17.21");
|
|
8
|
-
* // => true
|
|
9
|
-
* hasPackageVersion("@stryke/core@4.17.21");
|
|
10
|
-
* // => true
|
|
11
|
-
* hasPackageVersion("lodash");
|
|
12
|
-
* // => false
|
|
13
|
-
* hasPackageVersion("@stryke/core");
|
|
14
|
-
* // => false
|
|
15
|
-
* hasPackageVersion("lodash/module");
|
|
16
|
-
* // => false
|
|
17
|
-
* hasPackageVersion("@stryke/core/module");
|
|
18
|
-
* // => false
|
|
19
|
-
* hasPackageVersion("lodash/module@4.17.21");
|
|
20
|
-
* // => true
|
|
21
|
-
* hasPackageVersion("@stryke/core/module@4.17.21");
|
|
22
|
-
* // => true
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param value - The package name with version
|
|
26
|
-
* @returns Whether the package name has a version
|
|
27
|
-
*/
|
|
28
|
-
declare function hasPackageVersion(value: string): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Remove the version from a package name (if it exists)
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* removePackageVersion("lodash@4.17.21");
|
|
35
|
-
* // => "lodash"
|
|
36
|
-
* removePackageVersion("@stryke/core@4.17.21");
|
|
37
|
-
* // => "@stryke/core"
|
|
38
|
-
* removePackageVersion("lodash");
|
|
39
|
-
* // => "lodash"
|
|
40
|
-
* removePackageVersion("@stryke/core");
|
|
41
|
-
* // => "@stryke/core"
|
|
42
|
-
* getPackageName("lodash/module");
|
|
43
|
-
* // => "lodash/module"
|
|
44
|
-
* getPackageName("@stryke/core/module");
|
|
45
|
-
* // => "@stryke/core/module"
|
|
46
|
-
* getPackageName("lodash/module@4.17.21");
|
|
47
|
-
* // => "lodash/module"
|
|
48
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
49
|
-
* // => "@stryke/core/module"
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param value - The package name with version
|
|
53
|
-
* @returns The package name without version
|
|
54
|
-
*/
|
|
55
|
-
declare function removePackageVersion(value: string): string;
|
|
56
|
-
/**
|
|
57
|
-
* Get the package name from a scoped package string
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```typescript
|
|
61
|
-
* getPackageName("lodash@4.17.21");
|
|
62
|
-
* // => "lodash"
|
|
63
|
-
* getPackageName("@stryke/core@4.17.21");
|
|
64
|
-
* // => "@stryke/core"
|
|
65
|
-
* getPackageName("lodash");
|
|
66
|
-
* // => "lodash"
|
|
67
|
-
* getPackageName("@stryke/core");
|
|
68
|
-
* // => "@stryke/core"
|
|
69
|
-
* getPackageName("lodash/module");
|
|
70
|
-
* // => "lodash"
|
|
71
|
-
* getPackageName("@stryke/core/module");
|
|
72
|
-
* // => "@stryke/core"
|
|
73
|
-
* getPackageName("lodash/module@4.17.21");
|
|
74
|
-
* // => "lodash"
|
|
75
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
76
|
-
* // => "@stryke/core"
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @param value - The scoped package string
|
|
80
|
-
* @returns The package name without the scope
|
|
81
|
-
*/
|
|
82
|
-
declare function getPackageName(value: string): string;
|
|
83
|
-
/**
|
|
84
|
-
* Get the package version from a scoped package string
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```typescript
|
|
88
|
-
* getPackageName("lodash@4.17.21");
|
|
89
|
-
* // => "4.17.21"
|
|
90
|
-
* getPackageName("@stryke/core@4.17.21");
|
|
91
|
-
* // => "4.17.21"
|
|
92
|
-
* getPackageName("lodash");
|
|
93
|
-
* // => undefined
|
|
94
|
-
* getPackageName("@stryke/core");
|
|
95
|
-
* // => undefined
|
|
96
|
-
* getPackageName("lodash/module");
|
|
97
|
-
* // => undefined
|
|
98
|
-
* getPackageName("@stryke/core/module");
|
|
99
|
-
* // => undefined
|
|
100
|
-
* getPackageName("lodash/module@4.17.21");
|
|
101
|
-
* // => "4.17.21"
|
|
102
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
103
|
-
* // => "4.17.21"
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @param value - The scoped package string
|
|
107
|
-
* @returns The package version without the package name if it exists. If not, returns undefined.
|
|
108
|
-
*/
|
|
109
|
-
declare function getPackageVersion(value: string): string | undefined;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { removePackageVersion as i, getPackageVersion as n, hasPackageVersion as r, getPackageName as t };
|
|
112
|
-
//# sourceMappingURL=package-dwE_olpo.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-dwE_olpo.d.mts","names":[],"sources":["../src/package.ts"],"sourcesContent":[],"mappings":";;AA4CA;AA8BA;AAgCA;AAgCA;;;;;;;;;;;;;;;;;;;;;;iBA9FgB,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BA,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCA,iBAAA"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
//#region src/package.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Check if a package name has a version
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* hasPackageVersion("lodash@4.17.21");
|
|
8
|
-
* // => true
|
|
9
|
-
* hasPackageVersion("@stryke/core@4.17.21");
|
|
10
|
-
* // => true
|
|
11
|
-
* hasPackageVersion("lodash");
|
|
12
|
-
* // => false
|
|
13
|
-
* hasPackageVersion("@stryke/core");
|
|
14
|
-
* // => false
|
|
15
|
-
* hasPackageVersion("lodash/module");
|
|
16
|
-
* // => false
|
|
17
|
-
* hasPackageVersion("@stryke/core/module");
|
|
18
|
-
* // => false
|
|
19
|
-
* hasPackageVersion("lodash/module@4.17.21");
|
|
20
|
-
* // => true
|
|
21
|
-
* hasPackageVersion("@stryke/core/module@4.17.21");
|
|
22
|
-
* // => true
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param value - The package name with version
|
|
26
|
-
* @returns Whether the package name has a version
|
|
27
|
-
*/
|
|
28
|
-
declare function hasPackageVersion(value: string): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Remove the version from a package name (if it exists)
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* removePackageVersion("lodash@4.17.21");
|
|
35
|
-
* // => "lodash"
|
|
36
|
-
* removePackageVersion("@stryke/core@4.17.21");
|
|
37
|
-
* // => "@stryke/core"
|
|
38
|
-
* removePackageVersion("lodash");
|
|
39
|
-
* // => "lodash"
|
|
40
|
-
* removePackageVersion("@stryke/core");
|
|
41
|
-
* // => "@stryke/core"
|
|
42
|
-
* getPackageName("lodash/module");
|
|
43
|
-
* // => "lodash/module"
|
|
44
|
-
* getPackageName("@stryke/core/module");
|
|
45
|
-
* // => "@stryke/core/module"
|
|
46
|
-
* getPackageName("lodash/module@4.17.21");
|
|
47
|
-
* // => "lodash/module"
|
|
48
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
49
|
-
* // => "@stryke/core/module"
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param value - The package name with version
|
|
53
|
-
* @returns The package name without version
|
|
54
|
-
*/
|
|
55
|
-
declare function removePackageVersion(value: string): string;
|
|
56
|
-
/**
|
|
57
|
-
* Get the package name from a scoped package string
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```typescript
|
|
61
|
-
* getPackageName("lodash@4.17.21");
|
|
62
|
-
* // => "lodash"
|
|
63
|
-
* getPackageName("@stryke/core@4.17.21");
|
|
64
|
-
* // => "@stryke/core"
|
|
65
|
-
* getPackageName("lodash");
|
|
66
|
-
* // => "lodash"
|
|
67
|
-
* getPackageName("@stryke/core");
|
|
68
|
-
* // => "@stryke/core"
|
|
69
|
-
* getPackageName("lodash/module");
|
|
70
|
-
* // => "lodash"
|
|
71
|
-
* getPackageName("@stryke/core/module");
|
|
72
|
-
* // => "@stryke/core"
|
|
73
|
-
* getPackageName("lodash/module@4.17.21");
|
|
74
|
-
* // => "lodash"
|
|
75
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
76
|
-
* // => "@stryke/core"
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @param value - The scoped package string
|
|
80
|
-
* @returns The package name without the scope
|
|
81
|
-
*/
|
|
82
|
-
declare function getPackageName(value: string): string;
|
|
83
|
-
/**
|
|
84
|
-
* Get the package version from a scoped package string
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```typescript
|
|
88
|
-
* getPackageName("lodash@4.17.21");
|
|
89
|
-
* // => "4.17.21"
|
|
90
|
-
* getPackageName("@stryke/core@4.17.21");
|
|
91
|
-
* // => "4.17.21"
|
|
92
|
-
* getPackageName("lodash");
|
|
93
|
-
* // => undefined
|
|
94
|
-
* getPackageName("@stryke/core");
|
|
95
|
-
* // => undefined
|
|
96
|
-
* getPackageName("lodash/module");
|
|
97
|
-
* // => undefined
|
|
98
|
-
* getPackageName("@stryke/core/module");
|
|
99
|
-
* // => undefined
|
|
100
|
-
* getPackageName("lodash/module@4.17.21");
|
|
101
|
-
* // => "4.17.21"
|
|
102
|
-
* getPackageName("@stryke/core/module@4.17.21");
|
|
103
|
-
* // => "4.17.21"
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @param value - The scoped package string
|
|
107
|
-
* @returns The package version without the package name if it exists. If not, returns undefined.
|
|
108
|
-
*/
|
|
109
|
-
declare function getPackageVersion(value: string): string | undefined;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { removePackageVersion as i, getPackageVersion as n, hasPackageVersion as r, getPackageName as t };
|
|
112
|
-
//# sourceMappingURL=package-o2QJauB-.d.cts.map
|