toolbox-x 2.2.5 → 2.4.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 +18 -0
- 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 +157 -87
- package/dist/index.d.cts +46 -1
- package/dist/index.d.mts +46 -1
- package/dist/index.mjs +74 -8
- 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 +19 -23
- 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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
|
-
const require_primitives = require('
|
|
18
|
+
const require_primitives = require('../primitives-CBGICrDR.cjs');
|
|
19
19
|
|
|
20
20
|
//#region src/verbalizer/rules.ts
|
|
21
21
|
/** Irregular verb mappings: base → past → past participle */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as isNonEmptyString } from "
|
|
17
|
+
import { a as isNonEmptyString } from "../primitives-Djsevc69.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/verbalizer/rules.ts
|
|
20
20
|
/** Irregular verb mappings: base → past → past participle */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolbox-x",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -122,48 +122,44 @@
|
|
|
122
122
|
"require": "./dist/change-case.cjs"
|
|
123
123
|
},
|
|
124
124
|
"./colors": {
|
|
125
|
-
"import": "./dist/colors.mjs",
|
|
126
|
-
"require": "./dist/colors.cjs"
|
|
125
|
+
"import": "./dist/colors/index.mjs",
|
|
126
|
+
"require": "./dist/colors/index.cjs"
|
|
127
127
|
},
|
|
128
128
|
"./constants": {
|
|
129
129
|
"import": "./dist/constants.mjs",
|
|
130
130
|
"require": "./dist/constants.cjs"
|
|
131
131
|
},
|
|
132
132
|
"./converter": {
|
|
133
|
-
"import": "./dist/converter.mjs",
|
|
134
|
-
"require": "./dist/converter.cjs"
|
|
133
|
+
"import": "./dist/converter/index.mjs",
|
|
134
|
+
"require": "./dist/converter/index.cjs"
|
|
135
135
|
},
|
|
136
136
|
"./date": {
|
|
137
|
-
"import": "./dist/date.mjs",
|
|
138
|
-
"require": "./dist/date.cjs"
|
|
137
|
+
"import": "./dist/date/index.mjs",
|
|
138
|
+
"require": "./dist/date/index.cjs"
|
|
139
139
|
},
|
|
140
140
|
"./dom": {
|
|
141
|
-
"import": "./dist/dom.mjs",
|
|
142
|
-
"require": "./dist/dom.cjs"
|
|
141
|
+
"import": "./dist/dom/index.mjs",
|
|
142
|
+
"require": "./dist/dom/index.cjs"
|
|
143
143
|
},
|
|
144
144
|
"./guards": {
|
|
145
|
-
"import": "./dist/guards.mjs",
|
|
146
|
-
"require": "./dist/guards.cjs"
|
|
145
|
+
"import": "./dist/guards/index.mjs",
|
|
146
|
+
"require": "./dist/guards/index.cjs"
|
|
147
147
|
},
|
|
148
148
|
"./hash": {
|
|
149
|
-
"import": "./dist/hash.mjs",
|
|
150
|
-
"require": "./dist/hash.cjs"
|
|
149
|
+
"import": "./dist/hash/index.mjs",
|
|
150
|
+
"require": "./dist/hash/index.cjs"
|
|
151
151
|
},
|
|
152
152
|
"./http-status": {
|
|
153
|
-
"import": "./dist/http-status.mjs",
|
|
154
|
-
"require": "./dist/http-status.cjs"
|
|
153
|
+
"import": "./dist/http-status/index.mjs",
|
|
154
|
+
"require": "./dist/http-status/index.cjs"
|
|
155
155
|
},
|
|
156
156
|
"./paginator": {
|
|
157
157
|
"import": "./dist/paginator.mjs",
|
|
158
158
|
"require": "./dist/paginator.cjs"
|
|
159
159
|
},
|
|
160
|
-
"./pluralizer": {
|
|
161
|
-
"import": "./dist/pluralizer.mjs",
|
|
162
|
-
"require": "./dist/pluralizer.cjs"
|
|
163
|
-
},
|
|
164
160
|
"./stylog": {
|
|
165
|
-
"import": "./dist/stylog.mjs",
|
|
166
|
-
"require": "./dist/stylog.cjs"
|
|
161
|
+
"import": "./dist/stylog/index.mjs",
|
|
162
|
+
"require": "./dist/stylog/index.cjs"
|
|
167
163
|
},
|
|
168
164
|
"./types": {
|
|
169
165
|
"import": "./dist/types/index.mjs",
|
|
@@ -226,8 +222,8 @@
|
|
|
226
222
|
"require": "./dist/types/verbalizer.cjs"
|
|
227
223
|
},
|
|
228
224
|
"./verbalizer": {
|
|
229
|
-
"import": "./dist/verbalizer.mjs",
|
|
230
|
-
"require": "./dist/verbalizer.cjs"
|
|
225
|
+
"import": "./dist/verbalizer/index.mjs",
|
|
226
|
+
"require": "./dist/verbalizer/index.cjs"
|
|
231
227
|
},
|
|
232
228
|
"./package.json": "./package.json"
|
|
233
229
|
},
|
|
@@ -1,42 +0,0 @@
|
|
|
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 { 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
|
|
42
|
-
export { PluralizeOptions as n, PluralizeRule as r, IrregularMap as t };
|
|
@@ -1,42 +0,0 @@
|
|
|
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 { ct as Numeric } from "./object-DyVg8BFt.cjs";
|
|
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
|
|
42
|
-
export { PluralizeOptions as n, PluralizeRule as r, IrregularMap as t };
|