toolbox-x 2.2.4 → 2.3.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/CHANGELOG.md +23 -4
- package/dist/{guards-Dc9MB9on.mjs → basics-B7Sqf33u.mjs} +233 -233
- package/dist/{guards-BSwFQX1M.cjs → basics-Cif013VV.cjs} +233 -233
- package/dist/{colors.cjs → colors/index.cjs} +6 -6
- package/dist/{colors.d.mts → colors/index.d.cts} +2 -2
- package/dist/{colors.d.cts → colors/index.d.mts} +2 -2
- package/dist/{colors.mjs → colors/index.mjs} +6 -6
- package/dist/constants.cjs +13 -13
- package/dist/constants.mjs +3 -3
- package/dist/{converter.cjs → converter/index.cjs} +1 -1
- package/dist/{converter.d.cts → converter/index.d.cts} +2 -2
- package/dist/{converter.d.mts → converter/index.d.mts} +2 -2
- package/dist/{converter.mjs → converter/index.mjs} +1 -1
- package/dist/{date.cjs → date/index.cjs} +7 -7
- package/dist/{date.d.cts → date/index.d.cts} +1 -1
- package/dist/{date.d.mts → date/index.d.mts} +1 -1
- package/dist/{date.mjs → date/index.mjs} +7 -7
- package/dist/{dom.cjs → dom/index.cjs} +8 -8
- package/dist/{dom.d.cts → dom/index.d.cts} +3 -3
- package/dist/{dom.d.mts → dom/index.d.mts} +3 -3
- package/dist/{dom.mjs → dom/index.mjs} +5 -5
- package/dist/{guards.cjs → guards/index.cjs} +38 -38
- package/dist/{guards.d.mts → guards/index.d.cts} +4 -4
- package/dist/{guards.d.cts → guards/index.d.mts} +4 -4
- package/dist/{guards.mjs → guards/index.mjs} +6 -6
- package/dist/{guards-CqbVT4L5.cjs → guards-BD2Fkugj.cjs} +2 -2
- package/dist/{guards-DKGBsd6x.mjs → guards-DBunDnng.mjs} +2 -2
- package/dist/{hash.cjs → hash/index.cjs} +69 -66
- package/dist/{hash.d.cts → hash/index.d.cts} +77 -5
- package/dist/{hash.d.mts → hash/index.d.mts} +77 -5
- package/dist/{hash.mjs → hash/index.mjs} +5 -5
- package/dist/{http-status.cjs → http-status/index.cjs} +1 -1
- package/dist/{http-status.d.mts → http-status/index.d.cts} +2 -2
- package/dist/{http-status.d.cts → http-status/index.d.mts} +2 -2
- package/dist/{http-status.mjs → http-status/index.mjs} +1 -1
- package/dist/index.cjs +84 -84
- package/dist/index.mjs +5 -5
- package/dist/{parse-TuFyLeVH.mjs → parse-CILDG7TG.mjs} +3 -3
- package/dist/{parse-jh637S25.cjs → parse-CffWYCuy.cjs} +3 -3
- package/dist/{query-sWSi-d7u.cjs → query-Blm7AiEZ.cjs} +9 -9
- package/dist/{query-BomnyWh3.mjs → query-PGFEup3p.mjs} +2 -2
- package/dist/{stylog.cjs → stylog/index.cjs} +5 -5
- package/dist/{stylog.d.cts → stylog/index.d.cts} +2 -2
- package/dist/{stylog.d.mts → stylog/index.d.mts} +2 -2
- package/dist/{stylog.mjs → stylog/index.mjs} +5 -5
- package/dist/types/pluralizer.d.cts +25 -1
- package/dist/types/pluralizer.d.mts +25 -1
- package/dist/{utilities-BSv8VbnM.mjs → utilities-CmPwOkdy.mjs} +1 -1
- package/dist/{utilities-BVpk3LKy.cjs → utilities-_COSGq1U.cjs} +1 -1
- package/dist/{basics-20lm69yy.mjs → utils-BO5CcsjK.mjs} +631 -548
- package/dist/{basics-byj0VH1c.cjs → utils-DR9g0Sef.cjs} +580 -479
- package/dist/{verbalizer.cjs → verbalizer/index.cjs} +1 -1
- package/dist/{verbalizer.mjs → verbalizer/index.mjs} +1 -1
- package/package.json +22 -25
- package/dist/pluralizer-DXMuPUAK.d.mts +0 -42
- package/dist/pluralizer-DYsDqq9c.d.cts +0 -42
- package/dist/pluralizer.cjs +0 -678
- package/dist/pluralizer.d.cts +0 -152
- package/dist/pluralizer.d.mts +0 -152
- package/dist/pluralizer.mjs +0 -676
- /package/dist/{verbalizer.d.cts → verbalizer/index.d.cts} +0 -0
- /package/dist/{verbalizer.d.mts → verbalizer/index.d.mts} +0 -0
|
@@ -14,5 +14,29 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { ct as Numeric } from "../object-DyVg8BFt.mjs";
|
|
18
|
+
|
|
19
|
+
//#region src/types/pluralizer.d.ts
|
|
20
|
+
/** A pair of RegExp and replacement for pluralization rules */
|
|
21
|
+
type PluralizeRule = [RegExp, string];
|
|
22
|
+
/**
|
|
23
|
+
* A map of irregular singular to plural forms.
|
|
24
|
+
* Used for handling exceptions in pluralization.
|
|
25
|
+
*/
|
|
26
|
+
type IrregularMap = Record<string, string>;
|
|
27
|
+
/** * Options for pluralize method. */
|
|
28
|
+
interface PluralizeOptions {
|
|
29
|
+
/**
|
|
30
|
+
* The count to determine singular or plural form. Either number or numeric string.
|
|
31
|
+
* If not provided, bypass the check and pluralize the word anyways.
|
|
32
|
+
*/
|
|
33
|
+
count?: Numeric;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to include the count in the output. Depends on the `count` value.
|
|
36
|
+
* If true, the output will be in the format "2 Categories".
|
|
37
|
+
* If false, it will just return the pluralized word.
|
|
38
|
+
*/
|
|
39
|
+
inclusive?: boolean;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
18
42
|
export { IrregularMap, PluralizeOptions, PluralizeRule };
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { c as isNumber } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { d as isNumericString } from "./specials-krf7zsqI.mjs";
|
|
19
18
|
import { r as CURRENCY_LOCALES } from "./constants-ZyfpysiQ.mjs";
|
|
19
|
+
import { d as isNumericString } from "./specials-krf7zsqI.mjs";
|
|
20
20
|
|
|
21
21
|
//#region src/number/utilities.ts
|
|
22
22
|
/**
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
18
|
-
const require_specials = require('./specials-DU8u108m.cjs');
|
|
19
18
|
const require_constants = require('./constants-B3nc8psr.cjs');
|
|
19
|
+
const require_specials = require('./specials-DU8u108m.cjs');
|
|
20
20
|
|
|
21
21
|
//#region src/number/utilities.ts
|
|
22
22
|
/**
|