@stryke/string-format 0.12.13 → 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
package/dist/normalize-email.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./normalize-email-us4o_m-8.mjs";export{e as normalizeEmail};
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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,3 +1,4 @@
|
|
|
1
|
+
//#region src/package.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Check if a package name has a version
|
|
3
4
|
*
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
* @param value - The package name with version
|
|
25
26
|
* @returns Whether the package name has a version
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
declare function hasPackageVersion(value: string): boolean;
|
|
28
29
|
/**
|
|
29
30
|
* Remove the version from a package name (if it exists)
|
|
30
31
|
*
|
|
@@ -51,7 +52,7 @@ export declare function hasPackageVersion(value: string): boolean;
|
|
|
51
52
|
* @param value - The package name with version
|
|
52
53
|
* @returns The package name without version
|
|
53
54
|
*/
|
|
54
|
-
|
|
55
|
+
declare function removePackageVersion(value: string): string;
|
|
55
56
|
/**
|
|
56
57
|
* Get the package name from a scoped package string
|
|
57
58
|
*
|
|
@@ -78,7 +79,7 @@ export declare function removePackageVersion(value: string): string;
|
|
|
78
79
|
* @param value - The scoped package string
|
|
79
80
|
* @returns The package name without the scope
|
|
80
81
|
*/
|
|
81
|
-
|
|
82
|
+
declare function getPackageName(value: string): string;
|
|
82
83
|
/**
|
|
83
84
|
* Get the package version from a scoped package string
|
|
84
85
|
*
|
|
@@ -105,4 +106,7 @@ export declare function getPackageName(value: string): string;
|
|
|
105
106
|
* @param value - The scoped package string
|
|
106
107
|
* @returns The package version without the package name if it exists. If not, returns undefined.
|
|
107
108
|
*/
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-o2QJauB-.d.cts","names":[],"sources":["../src/package.ts"],"sourcesContent":[],"mappings":";;AA4CA;AA8BA;AAgCA;AAgCA;;;;;;;;;;;;;;;;;;;;;;iBA9FgB,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BA,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCA,iBAAA"}
|
package/dist/package.cjs
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getPackageName = getPackageName;
|
|
7
|
-
exports.getPackageVersion = getPackageVersion;
|
|
8
|
-
exports.hasPackageVersion = hasPackageVersion;
|
|
9
|
-
exports.removePackageVersion = removePackageVersion;
|
|
10
|
-
function hasPackageVersion(n) {
|
|
11
|
-
return /^.[^\n\r@\u2028\u2029]*@.*$/.test(n);
|
|
12
|
-
}
|
|
13
|
-
function removePackageVersion(n) {
|
|
14
|
-
return hasPackageVersion(n) ? n.substring(0, n.lastIndexOf("@")) : n;
|
|
15
|
-
}
|
|
16
|
-
function getPackageName(n) {
|
|
17
|
-
return /^[^\n\r/\u2028\u2029]*\/.[^\n\r/\u2028\u2029]*\/.*$/.test(n) ? n.substring(0, n.lastIndexOf("/")) : removePackageVersion(n);
|
|
18
|
-
}
|
|
19
|
-
function getPackageVersion(n) {
|
|
20
|
-
return hasPackageVersion(n) ? n.replace(/^.+@/, "") : void 0;
|
|
21
|
-
}
|
|
1
|
+
const e=require(`./package-Cw2gkIBD.cjs`);exports.getPackageName=e.t,exports.getPackageVersion=e.n,exports.hasPackageVersion=e.r,exports.removePackageVersion=e.i;
|
package/dist/package.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./package-BSidq8g2.mjs";export{r as getPackageName,t as getPackageVersion,n as hasPackageVersion,e as removePackageVersion};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n=` `){return e.padStart(Math.floor((t-e.length)/2)+e.length,n).padEnd(t,n)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pad-B___Grg_.mjs","names":[],"sources":["../src/pad.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 * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.\n * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.\n *\n * @param str - The string to pad.\n * @param length - The length of the resulting string once padded.\n * @param chars - The character(s) to use for padding.\n * @returns The padded string, or the original string if padding is not required.\n *\n * @example\n * ```ts\n * const result1 = pad('abc', 8); // result will be ' abc '\n * const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'\n * const result3 = pad('abc', 3); // result will be 'abc'\n * const result4 = pad('abc', 2); // result will be 'abc'\n * ```\n */\nexport function pad(str: string, length: number, chars = \" \"): string {\n return str\n .padStart(Math.floor((length - str.length) / 2) + str.length, chars)\n .padEnd(length, chars);\n}\n"],"mappings":"AAmCA,SAAgB,EAAI,EAAa,EAAgB,EAAQ,IAAa,CACpE,OAAO,EACJ,SAAS,KAAK,OAAO,EAAS,EAAI,QAAU,EAAE,CAAG,EAAI,OAAQ,EAAM,CACnE,OAAO,EAAQ,EAAM"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/pad.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
|
|
3
4
|
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
|
|
@@ -15,4 +16,7 @@
|
|
|
15
16
|
* const result4 = pad('abc', 2); // result will be 'abc'
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
declare function pad(str: string, length: number, chars?: string): string;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { pad as t };
|
|
22
|
+
//# sourceMappingURL=pad-C-Y_3U-y.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pad-C-Y_3U-y.d.cts","names":[],"sources":["../src/pad.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,GAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/pad.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
|
|
4
|
+
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
|
|
5
|
+
*
|
|
6
|
+
* @param str - The string to pad.
|
|
7
|
+
* @param length - The length of the resulting string once padded.
|
|
8
|
+
* @param chars - The character(s) to use for padding.
|
|
9
|
+
* @returns The padded string, or the original string if padding is not required.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const result1 = pad('abc', 8); // result will be ' abc '
|
|
14
|
+
* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'
|
|
15
|
+
* const result3 = pad('abc', 3); // result will be 'abc'
|
|
16
|
+
* const result4 = pad('abc', 2); // result will be 'abc'
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function pad(str: string, length: number, chars?: string): string;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { pad as t };
|
|
22
|
+
//# sourceMappingURL=pad-mujSKqwW.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pad-mujSKqwW.d.mts","names":[],"sources":["../src/pad.ts"],"sourcesContent":[],"mappings":";;AAmCA;;;;;;;;;;;;;;;;iBAAgB,GAAA"}
|
package/dist/pad.cjs
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.pad = pad;
|
|
7
|
-
function pad(n, t, r = " ") {
|
|
8
|
-
return n.padStart(Math.floor((t - n.length) / 2) + n.length, r).padEnd(t, r);
|
|
9
|
-
}
|
|
1
|
+
const e=require(`./pad-7O_mbugy.cjs`);exports.pad=e.t;
|
package/dist/pad.d.cts
ADDED
package/dist/pad.d.mts
ADDED
package/dist/pad.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./pad-B___Grg_.mjs";export{e as pad};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,t}from"./acronyms-CqHURYjd.mjs";import{r as n}from"./get-words-vlruPM_Q.mjs";function r(t){return t?/^[A-Z][A-Z0-9]*$/.test(t)&&e.includes(t.trim().toUpperCase())||/^(?:[A-Z][A-Z0-9]*[a-z]+)*$/.test(t):!1}function i(i){return r(i)||i===void 0?i:n(i).map(n=>e.includes(n.trim().toUpperCase())?t[n.trim().toUpperCase()]?.display||n.trim().toUpperCase():n.trim().charAt(0).toUpperCase()+n.trim().slice(1).toLowerCase()).join(``)}export{i as n,r as t};
|
|
2
|
+
//# sourceMappingURL=pascal-case-BNtNlP7E.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pascal-case-BNtNlP7E.mjs","names":[],"sources":["../src/pascal-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 { ACRONYM_LIST, ACRONYMS } from \"./acronyms\";\nimport { getWords } from \"./get-words\";\n\n/**\n * Check if the input string is in pascal case.\n *\n * @remarks\n * Pascal case is defined as an uppercase first letter followed by any number of lowercase letters and digits - \"ThisIsAnExample\".\n *\n * @param input - The input string to check.\n * @returns True if the input is in pascal case, false otherwise.\n */\nexport function isPascalCase(input: string | undefined): boolean {\n return input\n ? (/^[A-Z][A-Z0-9]*$/.test(input) &&\n ACRONYM_LIST.includes(input.trim().toUpperCase())) ||\n /^(?:[A-Z][A-Z0-9]*[a-z]+)*$/.test(input)\n : false;\n}\n\n/**\n * Convert the input string to pascal case.\n *\n * @remarks\n * Pascal case is defined as an uppercase first letter followed by any number of lowercase letters and digits - \"ThisIsAnExample\".\n *\n * @param input - The input string.\n * @returns The pascal-cased string.\n */\nexport function pascalCase<T extends string | undefined>(input?: T): T {\n return (\n isPascalCase(input) || input === undefined\n ? input\n : getWords(input)\n .map(word =>\n ACRONYM_LIST.includes(word.trim().toUpperCase())\n ? ACRONYMS[word.trim().toUpperCase()]?.display ||\n word.trim().toUpperCase()\n : word.trim().charAt(0).toUpperCase() +\n word.trim().slice(1).toLowerCase()\n )\n .join(\"\")\n ) as T;\n}\n"],"mappings":"2FA8BA,SAAgB,EAAa,EAAoC,CAC/D,OAAO,EACF,mBAAmB,KAAK,EAAM,EAC7B,EAAa,SAAS,EAAM,MAAM,CAAC,aAAa,CAAC,EACjD,8BAA8B,KAAK,EAAM,CAC3C,GAYN,SAAgB,EAAyC,EAAc,CACrE,OACE,EAAa,EAAM,EAAI,IAAU,IAAA,GAC7B,EACA,EAAS,EAAM,CACZ,IAAI,GACH,EAAa,SAAS,EAAK,MAAM,CAAC,aAAa,CAAC,CAC5C,EAAS,EAAK,MAAM,CAAC,aAAa,GAAG,SACrC,EAAK,MAAM,CAAC,aAAa,CACzB,EAAK,MAAM,CAAC,OAAO,EAAE,CAAC,aAAa,CACnC,EAAK,MAAM,CAAC,MAAM,EAAE,CAAC,aAAa,CACvC,CACA,KAAK,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./acronyms-DiyHB1FK.cjs`),t=require(`./get-words-IF97Rpfr.cjs`);function n(t){return t?/^[A-Z][A-Z0-9]*$/.test(t)&&e.i.includes(t.trim().toUpperCase())||/^(?:[A-Z][A-Z0-9]*[a-z]+)*$/.test(t):!1}function r(r){return n(r)||r===void 0?r:t.r(r).map(t=>e.i.includes(t.trim().toUpperCase())?e.t[t.trim().toUpperCase()]?.display||t.trim().toUpperCase():t.trim().charAt(0).toUpperCase()+t.trim().slice(1).toLowerCase()).join(``)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/pascal-case.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Check if the input string is in pascal case.
|
|
3
4
|
*
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
* @param input - The input string to check.
|
|
8
9
|
* @returns True if the input is in pascal case, false otherwise.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
declare function isPascalCase(input: string | undefined): boolean;
|
|
11
12
|
/**
|
|
12
13
|
* Convert the input string to pascal case.
|
|
13
14
|
*
|
|
@@ -17,4 +18,7 @@ export declare function isPascalCase(input: string | undefined): boolean;
|
|
|
17
18
|
* @param input - The input string.
|
|
18
19
|
* @returns The pascal-cased string.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
declare function pascalCase<T extends string | undefined>(input?: T): T;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { pascalCase as n, isPascalCase as t };
|
|
24
|
+
//# sourceMappingURL=pascal-case-DpwdMyIR.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pascal-case-DpwdMyIR.d.mts","names":[],"sources":["../src/pascal-case.ts"],"sourcesContent":[],"mappings":";;AA8BA;AAiBA;;;;;;;iBAjBgB,YAAA;;;;;;;;;;iBAiBA,iDAAiD,IAAI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/pascal-case.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if the input string is in pascal case.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Pascal case is defined as an uppercase first letter followed by any number of lowercase letters and digits - "ThisIsAnExample".
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string to check.
|
|
9
|
+
* @returns True if the input is in pascal case, false otherwise.
|
|
10
|
+
*/
|
|
11
|
+
declare function isPascalCase(input: string | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Convert the input string to pascal case.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Pascal case is defined as an uppercase first letter followed by any number of lowercase letters and digits - "ThisIsAnExample".
|
|
17
|
+
*
|
|
18
|
+
* @param input - The input string.
|
|
19
|
+
* @returns The pascal-cased string.
|
|
20
|
+
*/
|
|
21
|
+
declare function pascalCase<T extends string | undefined>(input?: T): T;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { pascalCase as n, isPascalCase as t };
|
|
24
|
+
//# sourceMappingURL=pascal-case-KPXemzHF.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pascal-case-KPXemzHF.d.cts","names":[],"sources":["../src/pascal-case.ts"],"sourcesContent":[],"mappings":";;AA8BA;AAiBA;;;;;;;iBAjBgB,YAAA;;;;;;;;;;iBAiBA,iDAAiD,IAAI"}
|
package/dist/pascal-case.cjs
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isPascalCase = isPascalCase;
|
|
7
|
-
exports.pascalCase = pascalCase;
|
|
8
|
-
var _acronyms = require("./acronyms.cjs");
|
|
9
|
-
var _getWords = require("./get-words.cjs");
|
|
10
|
-
function isPascalCase(e) {
|
|
11
|
-
return e ? /^[A-Z][A-Z0-9]*$/.test(e) && _acronyms.ACRONYM_LIST.includes(e.trim().toUpperCase()) || /^(?:[A-Z][A-Z0-9]*[a-z]+)*$/.test(e) : !1;
|
|
12
|
-
}
|
|
13
|
-
function pascalCase(e) {
|
|
14
|
-
return isPascalCase(e) || e === void 0 ? e : (0, _getWords.getWords)(e).map(s => _acronyms.ACRONYM_LIST.includes(s.trim().toUpperCase()) ? _acronyms.ACRONYMS[s.trim().toUpperCase()]?.display || s.trim().toUpperCase() : s.trim().charAt(0).toUpperCase() + s.trim().slice(1).toLowerCase()).join("");
|
|
15
|
-
}
|
|
1
|
+
require(`./acronyms-DiyHB1FK.cjs`);const e=require(`./pascal-case-BQIXhOgM.cjs`);exports.isPascalCase=e.t,exports.pascalCase=e.n;
|
package/dist/pascal-case.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./acronyms-CqHURYjd.mjs";import{n as e,t}from"./pascal-case-BNtNlP7E.mjs";export{t as isPascalCase,e as pascalCase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./base-DdjslzIj.cjs`),t=require(`./upper-case-first-IJMSoKjS.cjs`);function n(e){return e?/^[a-z]+(?:\.[a-z0-9]+)*$/.test(e):!1}function r(r){if(!r||n(r))return r;let i=r?.replace(/[A-Z]+/g,n=>t.t(n)??e.t)?.split(/(?=[A-Z])|[\s._-]/).map(e=>e.toLowerCase())??[];return i.length===0?``:i.length===1?i[0]:i.reduce((e,t)=>`${e}.${t.toLowerCase()}`.toLowerCase())}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/period-split.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Check if the input string is in snake case.
|
|
3
4
|
*
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
* @param input - The input string to check.
|
|
8
9
|
* @returns True if the input is in snake case, false otherwise.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
declare function isPeriodSplit(input: string | undefined): boolean;
|
|
11
12
|
/**
|
|
12
13
|
* Make all characters lowercase and add a period in between each word
|
|
13
14
|
*
|
|
@@ -17,4 +18,7 @@ export declare function isPeriodSplit(input: string | undefined): boolean;
|
|
|
17
18
|
* @param input - The input string.
|
|
18
19
|
* @returns The period-split string.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
declare function periodSplit<T extends string | undefined>(input?: T): T;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { periodSplit as n, isPeriodSplit as t };
|
|
24
|
+
//# sourceMappingURL=period-split-C2v7R4SQ.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"period-split-C2v7R4SQ.d.cts","names":[],"sources":["../src/period-split.ts"],"sourcesContent":[],"mappings":";;AA8BA;AAaA;;;;;;;iBAbgB,aAAA;;;;;;;;;;iBAaA,kDAAkD,IAAI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/period-split.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if the input string is in snake case.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string to check.
|
|
9
|
+
* @returns True if the input is in snake case, false otherwise.
|
|
10
|
+
*/
|
|
11
|
+
declare function isPeriodSplit(input: string | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Make all characters lowercase and add a period in between each word
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* "this.is.an.example"
|
|
17
|
+
*
|
|
18
|
+
* @param input - The input string.
|
|
19
|
+
* @returns The period-split string.
|
|
20
|
+
*/
|
|
21
|
+
declare function periodSplit<T extends string | undefined>(input?: T): T;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { periodSplit as n, isPeriodSplit as t };
|
|
24
|
+
//# sourceMappingURL=period-split-CBVGYrUw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"period-split-CBVGYrUw.d.mts","names":[],"sources":["../src/period-split.ts"],"sourcesContent":[],"mappings":";;AA8BA;AAaA;;;;;;;iBAbgB,aAAA;;;;;;;;;;iBAaA,kDAAkD,IAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./base-BHbehXQX.mjs";import{t}from"./upper-case-first-Ca89zvpr.mjs";function n(e){return e?/^[a-z]+(?:\.[a-z0-9]+)*$/.test(e):!1}function r(r){if(!r||n(r))return r;let i=r?.replace(/[A-Z]+/g,n=>t(n)??e)?.split(/(?=[A-Z])|[\s._-]/).map(e=>e.toLowerCase())??[];return i.length===0?``:i.length===1?i[0]:i.reduce((e,t)=>`${e}.${t.toLowerCase()}`.toLowerCase())}export{r as n,n as t};
|
|
2
|
+
//# sourceMappingURL=period-split-PMoklYb7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"period-split-PMoklYb7.mjs","names":["input"],"sources":["../src/period-split.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 { EMPTY_STRING } from \"@stryke/types\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\n/**\n * Check if the input string is in snake case.\n *\n * @remarks\n * Snake case is defined as all lowercase letters with underscores separating words - \"this_is_an_example\"\n *\n * @param input - The input string to check.\n * @returns True if the input is in snake case, false otherwise.\n */\nexport function isPeriodSplit(input: string | undefined): boolean {\n return input ? /^[a-z]+(?:\\.[a-z0-9]+)*$/.test(input) : false;\n}\n\n/**\n * Make all characters lowercase and add a period in between each word\n *\n * @remarks\n * \"this.is.an.example\"\n *\n * @param input - The input string.\n * @returns The period-split string.\n */\nexport function periodSplit<T extends string | undefined>(input?: T): T {\n if (!input || isPeriodSplit(input)) {\n return input as T;\n }\n\n const parts =\n input\n ?.replace(\n /[A-Z]+/g,\n (input?: string) => upperCaseFirst(input) ?? EMPTY_STRING\n )\n ?.split(/(?=[A-Z])|[\\s._-]/)\n .map(x => x.toLowerCase()) ?? [];\n if (parts.length === 0) {\n return \"\" as T;\n }\n if (parts.length === 1) {\n return parts[0] as T;\n }\n\n return parts.reduce((ret: string, part: string) => {\n return `${ret}.${part.toLowerCase()}`.toLowerCase();\n }) as T;\n}\n"],"mappings":"uFA8BA,SAAgB,EAAc,EAAoC,CAChE,OAAO,EAAQ,2BAA2B,KAAK,EAAM,CAAG,GAY1D,SAAgB,EAA0C,EAAc,CACtE,GAAI,CAAC,GAAS,EAAc,EAAM,CAChC,OAAO,EAGT,IAAM,EACJ,GACI,QACA,UACC,GAAmB,EAAeA,EAAM,EAAI,EAC9C,EACC,MAAM,oBAAoB,CAC3B,IAAI,GAAK,EAAE,aAAa,CAAC,EAAI,EAAE,CAQpC,OAPI,EAAM,SAAW,EACZ,GAEL,EAAM,SAAW,EACZ,EAAM,GAGR,EAAM,QAAQ,EAAa,IACzB,GAAG,EAAI,GAAG,EAAK,aAAa,GAAG,aAAa,CACnD"}
|
package/dist/period-split.cjs
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isPeriodSplit = isPeriodSplit;
|
|
7
|
-
exports.periodSplit = periodSplit;
|
|
8
|
-
var _types = require("@stryke/types");
|
|
9
|
-
var _upperCaseFirst = require("./upper-case-first.cjs");
|
|
10
|
-
function isPeriodSplit(e) {
|
|
11
|
-
return e ? /^[a-z]+(?:\.[a-z0-9]+)*$/.test(e) : !1;
|
|
12
|
-
}
|
|
13
|
-
function periodSplit(e) {
|
|
14
|
-
if (!e || isPeriodSplit(e)) return e;
|
|
15
|
-
const t = e?.replace(/[A-Z]+/g, r => (0, _upperCaseFirst.upperCaseFirst)(r) ?? _types.EMPTY_STRING)?.split(/(?=[A-Z])|[\s._-]/).map(r => r.toLowerCase()) ?? [];
|
|
16
|
-
return t.length === 0 ? "" : t.length === 1 ? t[0] : t.reduce((r, s) => `${r}.${s.toLowerCase()}`.toLowerCase());
|
|
17
|
-
}
|
|
1
|
+
const e=require(`./period-split-BN6zXi_S.cjs`);exports.isPeriodSplit=e.t,exports.periodSplit=e.n;
|
package/dist/period-split.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as e,t}from"./period-split-PMoklYb7.mjs";export{t as isPeriodSplit,e as periodSplit};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=`about.above.across.after.against.along.among.around.at.because of.before.behind.below.beneath.beside.besides.between.beyond.but.by.concerning.despite.down.during.except.excepting.for.from.in.in front of.inside.in spite of.instead of.into.like.near.of.off.on.onto.out.outside.over.past.regarding.since.through.throughout.to.toward.under.underneath.until.up.upon.up to.with.within.without.with regard to.with respect to`.split(`.`);export{e as t};
|
|
2
|
+
//# sourceMappingURL=prepositions-BOeFQ28J.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepositions-BOeFQ28J.mjs","names":[],"sources":["../src/prepositions.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\nexport const PREPOSITIONS = [\n \"about\",\n \"above\",\n \"across\",\n \"after\",\n \"against\",\n \"along\",\n \"among\",\n \"around\",\n \"at\",\n \"because of\",\n \"before\",\n \"behind\",\n \"below\",\n \"beneath\",\n \"beside\",\n \"besides\",\n \"between\",\n \"beyond\",\n \"but\",\n \"by\",\n \"concerning\",\n \"despite\",\n \"down\",\n \"during\",\n \"except\",\n \"excepting\",\n \"for\",\n \"from\",\n \"in\",\n \"in front of\",\n \"inside\",\n \"in spite of\",\n \"instead of\",\n \"into\",\n \"like\",\n \"near\",\n \"of\",\n \"off\",\n \"on\",\n \"onto\",\n \"out\",\n \"outside\",\n \"over\",\n \"past\",\n \"regarding\",\n \"since\",\n \"through\",\n \"throughout\",\n \"to\",\n \"toward\",\n \"under\",\n \"underneath\",\n \"until\",\n \"up\",\n \"upon\",\n \"up to\",\n \"with\",\n \"within\",\n \"without\",\n \"with regard to\",\n \"with respect to\"\n];\n"],"mappings":"AAkBA,MAAa,EAAe,8aA8D3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`about.above.across.after.against.along.among.around.at.because of.before.behind.below.beneath.beside.besides.between.beyond.but.by.concerning.despite.down.during.except.excepting.for.from.in.in front of.inside.in spite of.instead of.into.like.near.of.off.on.onto.out.outside.over.past.regarding.since.through.throughout.to.toward.under.underneath.until.up.upon.up to.with.within.without.with regard to.with respect to`.split(`.`);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepositions-By1zoaRG.d.cts","names":[],"sources":["../src/prepositions.ts"],"sourcesContent":[],"mappings":";cAkBa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepositions-DHokBFOW.d.mts","names":[],"sources":["../src/prepositions.ts"],"sourcesContent":[],"mappings":";cAkBa"}
|
package/dist/prepositions.cjs
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PREPOSITIONS = void 0;
|
|
7
|
-
const PREPOSITIONS = exports.PREPOSITIONS = ["about", "above", "across", "after", "against", "along", "among", "around", "at", "because of", "before", "behind", "below", "beneath", "beside", "besides", "between", "beyond", "but", "by", "concerning", "despite", "down", "during", "except", "excepting", "for", "from", "in", "in front of", "inside", "in spite of", "instead of", "into", "like", "near", "of", "off", "on", "onto", "out", "outside", "over", "past", "regarding", "since", "through", "throughout", "to", "toward", "under", "underneath", "until", "up", "upon", "up to", "with", "within", "without", "with regard to", "with respect to"];
|
|
1
|
+
const e=require(`./prepositions-Bp1VMgpn.cjs`);exports.PREPOSITIONS=e.t;
|
package/dist/prepositions.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./prepositions-BOeFQ28J.mjs";export{e as PREPOSITIONS};
|