toolbox-x 1.0.0
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/LICENSE +201 -0
- package/dist/Color-B3mgF9Dh.d.cts +486 -0
- package/dist/Color-D38Xrw65.d.mts +486 -0
- package/dist/Stylog-Df7eq3-j.d.cts +519 -0
- package/dist/Stylog-jvlLcMQq.d.mts +519 -0
- package/dist/array-DvW0zIu6.d.mts +130 -0
- package/dist/array-rUnEVisO.d.cts +130 -0
- package/dist/basics-D_eSv0cu.cjs +132 -0
- package/dist/basics-Dp_aEK81.mjs +115 -0
- package/dist/basics-WEYWlnRO.d.cts +95 -0
- package/dist/basics-uBSfkBEI.d.mts +95 -0
- package/dist/case-BWIt8Ash.mjs +449 -0
- package/dist/case-C-S-b5YP.d.cts +327 -0
- package/dist/case-CS8Ii3A7.cjs +526 -0
- package/dist/case-CybASFPD.d.mts +327 -0
- package/dist/change-case.cjs +32 -0
- package/dist/change-case.d.cts +18 -0
- package/dist/change-case.d.mts +18 -0
- package/dist/change-case.mjs +19 -0
- package/dist/colors.cjs +574 -0
- package/dist/colors.d.cts +355 -0
- package/dist/colors.d.mts +355 -0
- package/dist/colors.mjs +547 -0
- package/dist/constants-2gAw23_7.mjs +144 -0
- package/dist/constants-B34K0QPi.d.cts +21 -0
- package/dist/constants-BIBDKY1u.cjs +924 -0
- package/dist/constants-BWT-810U.cjs +158 -0
- package/dist/constants-BwbHnXlM.mjs +662 -0
- package/dist/constants-BxN9l5el.cjs +74 -0
- package/dist/constants-CLS_bgKD.d.mts +847 -0
- package/dist/constants-D73iFu8g.mjs +171 -0
- package/dist/constants-DAfRxaa8.mjs +62 -0
- package/dist/constants-DQYeCjlx.cjs +207 -0
- package/dist/constants-Deeie-iH.d.mts +21 -0
- package/dist/constants-DpTG9RP6.d.mts +29 -0
- package/dist/constants-DqwnkJ_d.cjs +740 -0
- package/dist/constants-DvRUY_FY.cjs +150 -0
- package/dist/constants-VcRtQu0K.d.cts +29 -0
- package/dist/constants-X5hm1UtB.mjs +912 -0
- package/dist/constants-eNd-iYsV.mjs +134 -0
- package/dist/constants-qm8FafmD.d.cts +847 -0
- package/dist/constants.cjs +415 -0
- package/dist/constants.d.cts +184 -0
- package/dist/constants.d.mts +184 -0
- package/dist/constants.mjs +378 -0
- package/dist/convert-BOCgUv2D.cjs +252 -0
- package/dist/convert-Bn4jFomQ.mjs +169 -0
- package/dist/convert-BrzlG-m_.cjs +475 -0
- package/dist/convert-DhaUoPVU.mjs +368 -0
- package/dist/converter-1P90_RcP.d.mts +402 -0
- package/dist/converter-CmkcAppi.d.cts +402 -0
- package/dist/converter.cjs +780 -0
- package/dist/converter.d.cts +29 -0
- package/dist/converter.d.mts +29 -0
- package/dist/converter.mjs +771 -0
- package/dist/countries-CIpmtEzV.cjs +1469 -0
- package/dist/countries-Cy0xiqS3.mjs +1463 -0
- package/dist/css-colors-Bx947Ng3.d.cts +179 -0
- package/dist/css-colors-CXCDqQbG.cjs +186 -0
- package/dist/css-colors-CXTp1vvy.d.mts +179 -0
- package/dist/css-colors-DfUW3nTR.mjs +180 -0
- package/dist/date.cjs +332 -0
- package/dist/date.d.cts +213 -0
- package/dist/date.d.mts +213 -0
- package/dist/date.mjs +298 -0
- package/dist/dom.cjs +461 -0
- package/dist/dom.d.cts +228 -0
- package/dist/dom.d.mts +228 -0
- package/dist/dom.mjs +429 -0
- package/dist/form-BMFVGUrN.d.mts +118 -0
- package/dist/form-DRFbryvK.d.cts +118 -0
- package/dist/guards-3kaUX66g.mjs +157 -0
- package/dist/guards-C8gkvIHb.cjs +240 -0
- package/dist/guards-DdyU4h4o.mjs +110 -0
- package/dist/guards-Efhp1mNy.cjs +151 -0
- package/dist/guards.cjs +172 -0
- package/dist/guards.d.cts +399 -0
- package/dist/guards.d.mts +399 -0
- package/dist/guards.mjs +75 -0
- package/dist/hash-B6JPEyAz.d.mts +131 -0
- package/dist/hash-NTpeKYB_.d.cts +131 -0
- package/dist/hash.cjs +2126 -0
- package/dist/hash.d.cts +1239 -0
- package/dist/hash.d.mts +1239 -0
- package/dist/hash.mjs +2095 -0
- package/dist/http-status-BAZdtr7-.d.mts +65 -0
- package/dist/http-status-U_3MtoGb.d.cts +65 -0
- package/dist/http-status.cjs +173 -0
- package/dist/http-status.d.cts +142 -0
- package/dist/http-status.d.mts +142 -0
- package/dist/http-status.mjs +171 -0
- package/dist/index.cjs +2551 -0
- package/dist/index.d.cts +1493 -0
- package/dist/index.d.mts +1493 -0
- package/dist/index.mjs +2357 -0
- package/dist/object-B0TV3eHx.d.mts +8052 -0
- package/dist/object-Blq0Amdv.d.cts +8052 -0
- package/dist/objectify-CDs0Fbr1.mjs +417 -0
- package/dist/objectify-DIJ-OBmo.cjs +524 -0
- package/dist/paginator.cjs +245 -0
- package/dist/paginator.d.cts +144 -0
- package/dist/paginator.d.mts +144 -0
- package/dist/paginator.mjs +243 -0
- package/dist/parse-2ubxXZRp.cjs +211 -0
- package/dist/parse-N7g942uy.mjs +164 -0
- package/dist/pluralizer-BjMIc6uT.d.mts +42 -0
- package/dist/pluralizer-Cb6ZmrDl.d.cts +42 -0
- package/dist/pluralizer.cjs +678 -0
- package/dist/pluralizer.d.cts +152 -0
- package/dist/pluralizer.d.mts +152 -0
- package/dist/pluralizer.mjs +676 -0
- package/dist/primitives-B26uZolQ.cjs +228 -0
- package/dist/primitives-KsFUp3kQ.mjs +144 -0
- package/dist/specials-D48_IZbd.d.mts +108 -0
- package/dist/specials-DzLr1ZgU.cjs +477 -0
- package/dist/specials-LVONlKbQ.d.cts +108 -0
- package/dist/specials-uhDuRg8H.mjs +292 -0
- package/dist/string-CBAbxaG1.d.mts +258 -0
- package/dist/string-CsNsm_65.d.cts +258 -0
- package/dist/stylog.cjs +621 -0
- package/dist/stylog.d.cts +49 -0
- package/dist/stylog.d.mts +49 -0
- package/dist/stylog.mjs +614 -0
- package/dist/timezone-B2OYK6Fh.mjs +5589 -0
- package/dist/timezone-Beh9IGpw.cjs +5625 -0
- package/dist/types/array.cjs +16 -0
- package/dist/types/array.d.cts +18 -0
- package/dist/types/array.d.mts +18 -0
- package/dist/types/array.mjs +17 -0
- package/dist/types/colors.cjs +16 -0
- package/dist/types/colors.d.cts +18 -0
- package/dist/types/colors.d.mts +18 -0
- package/dist/types/colors.mjs +17 -0
- package/dist/types/converter.cjs +16 -0
- package/dist/types/converter.d.cts +18 -0
- package/dist/types/converter.d.mts +18 -0
- package/dist/types/converter.mjs +17 -0
- package/dist/types/form.cjs +16 -0
- package/dist/types/form.d.cts +18 -0
- package/dist/types/form.d.mts +18 -0
- package/dist/types/form.mjs +17 -0
- package/dist/types/hash.cjs +16 -0
- package/dist/types/hash.d.cts +18 -0
- package/dist/types/hash.d.mts +18 -0
- package/dist/types/hash.mjs +17 -0
- package/dist/types/http-status.cjs +16 -0
- package/dist/types/http-status.d.cts +18 -0
- package/dist/types/http-status.d.mts +18 -0
- package/dist/types/http-status.mjs +17 -0
- package/dist/types/index.cjs +16 -0
- package/dist/types/index.d.cts +18 -0
- package/dist/types/index.d.mts +18 -0
- package/dist/types/index.mjs +17 -0
- package/dist/types/number.cjs +16 -0
- package/dist/types/number.d.cts +18 -0
- package/dist/types/number.d.mts +18 -0
- package/dist/types/number.mjs +17 -0
- package/dist/types/object.cjs +16 -0
- package/dist/types/object.d.cts +18 -0
- package/dist/types/object.d.mts +18 -0
- package/dist/types/object.mjs +17 -0
- package/dist/types/pluralizer.cjs +16 -0
- package/dist/types/pluralizer.d.cts +18 -0
- package/dist/types/pluralizer.d.mts +18 -0
- package/dist/types/pluralizer.mjs +17 -0
- package/dist/types/string.cjs +16 -0
- package/dist/types/string.d.cts +18 -0
- package/dist/types/string.d.mts +18 -0
- package/dist/types/string.mjs +17 -0
- package/dist/types/stylog.cjs +16 -0
- package/dist/types/stylog.d.cts +18 -0
- package/dist/types/stylog.d.mts +18 -0
- package/dist/types/stylog.mjs +17 -0
- package/dist/types/utils.cjs +16 -0
- package/dist/types/utils.d.cts +18 -0
- package/dist/types/utils.d.mts +18 -0
- package/dist/types/utils.mjs +17 -0
- package/dist/types/verbalizer.cjs +16 -0
- package/dist/types/verbalizer.d.cts +30 -0
- package/dist/types/verbalizer.d.mts +30 -0
- package/dist/types/verbalizer.mjs +17 -0
- package/dist/utilities-CLUmdQeV.cjs +140 -0
- package/dist/utilities-m5yFKqLd.mjs +105 -0
- package/dist/utils-ClW9LA6f.mjs +449 -0
- package/dist/utils-DLFRgXUC.cjs +568 -0
- package/dist/verbalizer.cjs +998 -0
- package/dist/verbalizer.d.cts +148 -0
- package/dist/verbalizer.d.mts +148 -0
- package/dist/verbalizer.mjs +996 -0
- package/package.json +249 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { A as ParsedQuery, C as LeafValue, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizedData, I as StrictObject, M as QueryObject, N as QueryObjectValue, O as Objects, P as SanitizeOptions, S as KeyForObject, T as NestedKeyString, _ as FlattenLeafKey, a as ConvertObjectOptions, b as GenericObjectPrimitive, c as DeepKeys, d as DotNotationKeyStrict, f as DotValue, g as FlattenDotValue, h as FlattenDotKey, i as $Record, j as ParsedQueryGeneric, k as OmitPath, l as DeepKeysTuple, m as ExtractStringKey, n as $DoesPathStartWith, o as ConvertedObject, p as ExpandAll, r as $JoinDotKey, s as CountryDetails, t as $Countries, u as DotNotationKey, v as FlattenLeafValue, w as MergeAll, x as KeyForArray, y as GenericObject } from "../object-Blq0Amdv.cjs";
|
|
18
|
+
export { $Countries, $DoesPathStartWith, $JoinDotKey, $Record, ConvertObjectOptions, ConvertedObject, CountryDetails, DeepKeys, DeepKeysTuple, DotNotationKey, DotNotationKeyStrict, DotValue, ExpandAll, ExtractStringKey, FlattenDotKey, FlattenDotValue, FlattenLeafKey, FlattenLeafValue, GenericObject, GenericObjectPrimitive, KeyForArray, KeyForObject, LeafValue, MergeAll, NestedKeyString, NestedPrimitiveKey, NumericDotKey, Objects, OmitPath, ParsedQuery, ParsedQueryGeneric, QueryObject, QueryObjectValue, SanitizeOptions, SanitizedData, StrictObject };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { A as ParsedQuery, C as LeafValue, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizedData, I as StrictObject, M as QueryObject, N as QueryObjectValue, O as Objects, P as SanitizeOptions, S as KeyForObject, T as NestedKeyString, _ as FlattenLeafKey, a as ConvertObjectOptions, b as GenericObjectPrimitive, c as DeepKeys, d as DotNotationKeyStrict, f as DotValue, g as FlattenDotValue, h as FlattenDotKey, i as $Record, j as ParsedQueryGeneric, k as OmitPath, l as DeepKeysTuple, m as ExtractStringKey, n as $DoesPathStartWith, o as ConvertedObject, p as ExpandAll, r as $JoinDotKey, s as CountryDetails, t as $Countries, u as DotNotationKey, v as FlattenLeafValue, w as MergeAll, x as KeyForArray, y as GenericObject } from "../object-B0TV3eHx.mjs";
|
|
18
|
+
export { $Countries, $DoesPathStartWith, $JoinDotKey, $Record, ConvertObjectOptions, ConvertedObject, CountryDetails, DeepKeys, DeepKeysTuple, DotNotationKey, DotNotationKeyStrict, DotValue, ExpandAll, ExtractStringKey, FlattenDotKey, FlattenDotValue, FlattenLeafKey, FlattenLeafValue, GenericObject, GenericObjectPrimitive, KeyForArray, KeyForObject, LeafValue, MergeAll, NestedKeyString, NestedPrimitiveKey, NumericDotKey, Objects, OmitPath, ParsedQuery, ParsedQueryGeneric, QueryObject, QueryObjectValue, SanitizeOptions, SanitizedData, StrictObject };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { n as PluralizeOptions, r as PluralizeRule, t as IrregularMap } from "../pluralizer-Cb6ZmrDl.cjs";
|
|
18
|
+
export { IrregularMap, PluralizeOptions, PluralizeRule };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { n as PluralizeOptions, r as PluralizeRule, t as IrregularMap } from "../pluralizer-BjMIc6uT.mjs";
|
|
18
|
+
export { IrregularMap, PluralizeOptions, PluralizeRule };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { A as MaskOptions, B as TitleCase, C as DiffLineType, D as Includes, E as HighlightedText, F as RandomIdOptions, H as Trim, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, O as IsAlphabet, P as QueryString, R as SpecialCharacter, S as DiffLine, T as DotCase, V as TrainCase, _ as Country, a as $NormalizeString, b as CountryName, c as $TrimRight, d as AnagramOptions, f as CamelCase, g as ConstantCase, h as CharDiffResult, i as $LowercaseWords, j as PascalCase, k as KebabCase, l as $UppercaseWords, m as CaseFormat, n as $EnsureString, o as $TitleCaseWords, p as CapitalizeOptions, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as Alphabet, v as CountryCode, w as DiffResult, x as CountryShortISO, y as CountryISO, z as StringCaseOptions } from "../string-CsNsm_65.cjs";
|
|
18
|
+
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineType, DiffResult, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { A as MaskOptions, B as TitleCase, C as DiffLineType, D as Includes, E as HighlightedText, F as RandomIdOptions, H as Trim, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, O as IsAlphabet, P as QueryString, R as SpecialCharacter, S as DiffLine, T as DotCase, V as TrainCase, _ as Country, a as $NormalizeString, b as CountryName, c as $TrimRight, d as AnagramOptions, f as CamelCase, g as ConstantCase, h as CharDiffResult, i as $LowercaseWords, j as PascalCase, k as KebabCase, l as $UppercaseWords, m as CaseFormat, n as $EnsureString, o as $TitleCaseWords, p as CapitalizeOptions, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as Alphabet, v as CountryCode, w as DiffResult, x as CountryShortISO, y as CountryISO, z as StringCaseOptions } from "../string-CBAbxaG1.mjs";
|
|
18
|
+
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineType, DiffResult, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { a as AnsiSequence, c as Styles, i as Ansi16Value, l as StylogChain, o as BGColor, r as Ansi16Color, s as CSS16Color, u as TextStyle } from "../Stylog-Df7eq3-j.cjs";
|
|
18
|
+
export { Ansi16Color, Ansi16Value, AnsiSequence, BGColor, CSS16Color, Styles, StylogChain, TextStyle };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { a as AnsiSequence, c as Styles, i as Ansi16Value, l as StylogChain, o as BGColor, r as Ansi16Color, s as CSS16Color, u as TextStyle } from "../Stylog-jvlLcMQq.mjs";
|
|
18
|
+
export { Ansi16Color, Ansi16Value, AnsiSequence, BGColor, CSS16Color, Styles, StylogChain, TextStyle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { $n as ProtoMethodOptions, An as DeepPartialAll, Bn as MapObjectValues, Cn as ArrayOfObjectsToStringOptions, Dn as Cast, En as ArrayToTuple, Fn as IsStrictObject, Gn as PageListOptions, Hn as Mutable, In as Join, Jn as PickByValue, Kn as PaginatorMeta, Ln as Keyof, Mn as ExtractRequired, Nn as FromMetaOptions, On as DeepKeyof, Pn as Immutable, Qn as PropertyRequired, Rn as KeysOfUnion, Sn as $Without, Tn as ArrayToStringOptions, Un as OmitByValue, Vn as Merge, Wn as OneOf, Xn as Prettify, Yn as Pop, Zn as PropertyOptional, _n as $Forbid, ar as ReplaceFirst, bn as $Subtract, cr as RequireExactly, dr as Tuple, er as RangeTuple, fr as TupleOf, gn as $Expand, hn as $DeepPartial, hr as ValueOptional, ir as Replace, jn as ExtractOptional, kn as DeepPartial, lr as RequireOnly, mn as $BuildTuple, mr as ValueOf, nr as RenameKeys, or as RequireAtLeast, pr as TupleToUnion, qn as PaginatorOptions, rr as Repeat, sr as RequireBetween, tr as RemoveNever, ur as Split, vn as $JoinRepeat, wn as ArrayOfPrimitivesToStringOptions, xn as $UnionToIntersection, yn as $Range, zn as LooseLiteral } from "../object-Blq0Amdv.cjs";
|
|
18
|
+
export { $BuildTuple, $DeepPartial, $Expand, $Forbid, $JoinRepeat, $Range, $Subtract, $UnionToIntersection, $Without, ArrayOfObjectsToStringOptions, ArrayOfPrimitivesToStringOptions, ArrayToStringOptions, ArrayToTuple, Cast, DeepKeyof, DeepPartial, DeepPartialAll, ExtractOptional, ExtractRequired, FromMetaOptions, Immutable, IsStrictObject, Join, Keyof, KeysOfUnion, LooseLiteral, MapObjectValues, Merge, Mutable, OmitByValue, OneOf, PageListOptions, PaginatorMeta, PaginatorOptions, PickByValue, Pop, Prettify, PropertyOptional, PropertyRequired, ProtoMethodOptions, RangeTuple, RemoveNever, RenameKeys, Repeat, Replace, ReplaceFirst, RequireAtLeast, RequireBetween, RequireExactly, RequireOnly, Split, Tuple, TupleOf, TupleToUnion, ValueOf, ValueOptional };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { $n as ProtoMethodOptions, An as DeepPartialAll, Bn as MapObjectValues, Cn as ArrayOfObjectsToStringOptions, Dn as Cast, En as ArrayToTuple, Fn as IsStrictObject, Gn as PageListOptions, Hn as Mutable, In as Join, Jn as PickByValue, Kn as PaginatorMeta, Ln as Keyof, Mn as ExtractRequired, Nn as FromMetaOptions, On as DeepKeyof, Pn as Immutable, Qn as PropertyRequired, Rn as KeysOfUnion, Sn as $Without, Tn as ArrayToStringOptions, Un as OmitByValue, Vn as Merge, Wn as OneOf, Xn as Prettify, Yn as Pop, Zn as PropertyOptional, _n as $Forbid, ar as ReplaceFirst, bn as $Subtract, cr as RequireExactly, dr as Tuple, er as RangeTuple, fr as TupleOf, gn as $Expand, hn as $DeepPartial, hr as ValueOptional, ir as Replace, jn as ExtractOptional, kn as DeepPartial, lr as RequireOnly, mn as $BuildTuple, mr as ValueOf, nr as RenameKeys, or as RequireAtLeast, pr as TupleToUnion, qn as PaginatorOptions, rr as Repeat, sr as RequireBetween, tr as RemoveNever, ur as Split, vn as $JoinRepeat, wn as ArrayOfPrimitivesToStringOptions, xn as $UnionToIntersection, yn as $Range, zn as LooseLiteral } from "../object-B0TV3eHx.mjs";
|
|
18
|
+
export { $BuildTuple, $DeepPartial, $Expand, $Forbid, $JoinRepeat, $Range, $Subtract, $UnionToIntersection, $Without, ArrayOfObjectsToStringOptions, ArrayOfPrimitivesToStringOptions, ArrayToStringOptions, ArrayToTuple, Cast, DeepKeyof, DeepPartial, DeepPartialAll, ExtractOptional, ExtractRequired, FromMetaOptions, Immutable, IsStrictObject, Join, Keyof, KeysOfUnion, LooseLiteral, MapObjectValues, Merge, Mutable, OmitByValue, OneOf, PageListOptions, PaginatorMeta, PaginatorOptions, PickByValue, Pop, Prettify, PropertyOptional, PropertyRequired, ProtoMethodOptions, RangeTuple, RemoveNever, RenameKeys, Repeat, Replace, ReplaceFirst, RequireAtLeast, RequireBetween, RequireExactly, RequireOnly, Split, Tuple, TupleOf, TupleToUnion, ValueOf, ValueOptional };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
//#region src/types/verbalizer.d.ts
|
|
18
|
+
/** A pair of RegExp and replacement for Verbalizer rules */
|
|
19
|
+
type VerbRule = [RegExp, string];
|
|
20
|
+
/** * Type interface for Irregular Verb Entry */
|
|
21
|
+
interface IrregularEntry {
|
|
22
|
+
/** Base form of a verb */
|
|
23
|
+
base: string;
|
|
24
|
+
/** Past form of a verb */
|
|
25
|
+
past: string;
|
|
26
|
+
/** Past participle form of a verb */
|
|
27
|
+
participle: string;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { IrregularEntry, VerbRule };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
//#region src/types/verbalizer.d.ts
|
|
18
|
+
/** A pair of RegExp and replacement for Verbalizer rules */
|
|
19
|
+
type VerbRule = [RegExp, string];
|
|
20
|
+
/** * Type interface for Irregular Verb Entry */
|
|
21
|
+
interface IrregularEntry {
|
|
22
|
+
/** Base form of a verb */
|
|
23
|
+
base: string;
|
|
24
|
+
/** Past form of a verb */
|
|
25
|
+
past: string;
|
|
26
|
+
/** Past participle form of a verb */
|
|
27
|
+
participle: string;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { IrregularEntry, VerbRule };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const require_primitives = require('./primitives-B26uZolQ.cjs');
|
|
18
|
+
const require_constants = require('./constants-DqwnkJ_d.cjs');
|
|
19
|
+
const require_specials = require('./specials-DzLr1ZgU.cjs');
|
|
20
|
+
|
|
21
|
+
//#region src/number/utilities.ts
|
|
22
|
+
/**
|
|
23
|
+
* * Rounds a number to the nearest specified interval.
|
|
24
|
+
* @param value - The number to round.
|
|
25
|
+
* @param interval - The interval to round to. Defaults to `5`.
|
|
26
|
+
* @returns The number rounded to the nearest interval.
|
|
27
|
+
* @example roundToNearest(27, 5) → 25
|
|
28
|
+
*/
|
|
29
|
+
const roundToNearest = (value, interval = 5) => {
|
|
30
|
+
return Math.round(Number(value) / interval) * interval;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* * Formats a number as a currency string.
|
|
34
|
+
* @param value - The number to format.
|
|
35
|
+
* @param currency - The currency code (default: `USD`).
|
|
36
|
+
* @param locale - The locale for formatting (default: matching currency locale).
|
|
37
|
+
* @returns A formatted currency string.
|
|
38
|
+
* @example formatCurrency(1234.56) → "$1,234.56"
|
|
39
|
+
* @example formatCurrency(1234.56, "USD") → "$1,234.56"
|
|
40
|
+
* @example formatCurrency(1234.56, "USD", "en-US") → "$1,234.56"
|
|
41
|
+
*/
|
|
42
|
+
const formatCurrency = (value, currency = "USD", locale) => {
|
|
43
|
+
const selectedLocale = locale ? locale : require_constants.CURRENCY_LOCALES[currency];
|
|
44
|
+
return new Intl.NumberFormat(selectedLocale, {
|
|
45
|
+
style: "currency",
|
|
46
|
+
currency
|
|
47
|
+
}).format(value);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* * Clamps a number within a specified range.
|
|
51
|
+
* @param value - The number to clamp.
|
|
52
|
+
* @param min - The minimum allowed value.
|
|
53
|
+
* @param max - The maximum allowed value.
|
|
54
|
+
* @returns The clamped number.
|
|
55
|
+
* @example clampNumber(15, 10, 20) → 15
|
|
56
|
+
* @example clampNumber(5, 10, 20) → 10
|
|
57
|
+
* @example clampNumber(25, 10, 20) → 20
|
|
58
|
+
*/
|
|
59
|
+
const clampNumber = (value, min, max) => {
|
|
60
|
+
return Math.max(min, Math.min(value, max));
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* * Generates a random floating-point number within a range.
|
|
64
|
+
* @param min - The minimum value.
|
|
65
|
+
* @param max - The maximum value.
|
|
66
|
+
* @returns A random floating-point number between min and max.
|
|
67
|
+
* @example randomFloat(1.5, 3.5) → 2.84623
|
|
68
|
+
*/
|
|
69
|
+
const getRandomFloat = (min, max) => {
|
|
70
|
+
return Math.random() * (Number(max) - Number(min)) + Number(min);
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* * Returns the ordinal suffix for a given number (e.g., 1 -> 'st', 2 -> 'nd', 3 -> 'rd', 4 -> 'th' etc.).
|
|
74
|
+
* @description The function handles special cases for 11, 12, and 13, which all use 'th' despite the last digit.
|
|
75
|
+
* If the `withNumber` parameter is `true`, the function returns the number along with its ordinal suffix (e.g., "1st").
|
|
76
|
+
* Otherwise, it returns only the ordinal suffix (e.g., "st").
|
|
77
|
+
*
|
|
78
|
+
* @param num - The number or number string to get the ordinal suffix for.
|
|
79
|
+
* @param withNumber - Whether to include the number along with its ordinal suffix (defaults to `true`).
|
|
80
|
+
* @returns The appropriate ordinal suffix, optionally with the number (e.g., '1st' or 'st`, '2nd' or 'nd' and so on.).
|
|
81
|
+
*/
|
|
82
|
+
const getOrdinal = (num, withNumber = true) => {
|
|
83
|
+
const remainder10 = Number(num) % 10;
|
|
84
|
+
const remainder100 = Number(num) % 100;
|
|
85
|
+
let suffix;
|
|
86
|
+
if (remainder10 === 1 && remainder100 !== 11) suffix = "st";
|
|
87
|
+
else if (remainder10 === 2 && remainder100 !== 12) suffix = "nd";
|
|
88
|
+
else if (remainder10 === 3 && remainder100 !== 13) suffix = "rd";
|
|
89
|
+
else suffix = "th";
|
|
90
|
+
return withNumber ? String(num).concat(suffix) : suffix;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* * Normalize a number or numeric string to a number.
|
|
94
|
+
* @description
|
|
95
|
+
* This function checks if the input is a number or a numeric string and converts it to a number.
|
|
96
|
+
* If the input is not a valid number or numeric string, it returns `undefined`.
|
|
97
|
+
* @param num - The number to normalize.
|
|
98
|
+
* @returns The normalized number or `undefined` if the input is not a valid number or numeric string.
|
|
99
|
+
*/
|
|
100
|
+
function normalizeNumber(num) {
|
|
101
|
+
return require_primitives.isNumber(num) ? num : require_specials.isNumericString(num) ? Number(num) : void 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
Object.defineProperty(exports, 'clampNumber', {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () {
|
|
108
|
+
return clampNumber;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, 'formatCurrency', {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () {
|
|
114
|
+
return formatCurrency;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, 'getOrdinal', {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () {
|
|
120
|
+
return getOrdinal;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, 'getRandomFloat', {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () {
|
|
126
|
+
return getRandomFloat;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, 'normalizeNumber', {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return normalizeNumber;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, 'roundToNearest', {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () {
|
|
138
|
+
return roundToNearest;
|
|
139
|
+
}
|
|
140
|
+
});
|