radashi 12.7.0 → 12.7.2
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/dist/radashi.cjs +22 -17
- package/dist/radashi.d.cts +25 -23
- package/dist/radashi.d.ts +25 -23
- package/dist/radashi.js +22 -17
- package/package.json +3 -2
package/dist/radashi.cjs
CHANGED
|
@@ -1466,21 +1466,7 @@ var QuantityParser = class {
|
|
|
1466
1466
|
};
|
|
1467
1467
|
|
|
1468
1468
|
// src/oop/DurationParser.ts
|
|
1469
|
-
var
|
|
1470
|
-
constructor(options) {
|
|
1471
|
-
super({
|
|
1472
|
-
units: {
|
|
1473
|
-
..._DurationParser.units,
|
|
1474
|
-
...options == null ? void 0 : options.units
|
|
1475
|
-
},
|
|
1476
|
-
short: {
|
|
1477
|
-
..._DurationParser.shortUnits,
|
|
1478
|
-
...options == null ? void 0 : options.short
|
|
1479
|
-
}
|
|
1480
|
-
});
|
|
1481
|
-
}
|
|
1482
|
-
};
|
|
1483
|
-
_DurationParser.units = {
|
|
1469
|
+
var DURATION_UNITS = {
|
|
1484
1470
|
week: 6048e5,
|
|
1485
1471
|
day: 864e5,
|
|
1486
1472
|
hour: 36e5,
|
|
@@ -1488,7 +1474,7 @@ _DurationParser.units = {
|
|
|
1488
1474
|
second: 1e3,
|
|
1489
1475
|
millisecond: 1
|
|
1490
1476
|
};
|
|
1491
|
-
|
|
1477
|
+
var DURATION_SHORT_UNITS = {
|
|
1492
1478
|
w: "week",
|
|
1493
1479
|
d: "day",
|
|
1494
1480
|
h: "hour",
|
|
@@ -1496,7 +1482,26 @@ _DurationParser.shortUnits = {
|
|
|
1496
1482
|
s: "second",
|
|
1497
1483
|
ms: "millisecond"
|
|
1498
1484
|
};
|
|
1499
|
-
var DurationParser = _DurationParser
|
|
1485
|
+
var DurationParser = class _DurationParser extends QuantityParser {
|
|
1486
|
+
constructor(options) {
|
|
1487
|
+
super({
|
|
1488
|
+
units: {
|
|
1489
|
+
..._DurationParser.units,
|
|
1490
|
+
...options == null ? void 0 : options.units
|
|
1491
|
+
},
|
|
1492
|
+
short: {
|
|
1493
|
+
..._DurationParser.shortUnits,
|
|
1494
|
+
...options == null ? void 0 : options.short
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
static get units() {
|
|
1499
|
+
return DURATION_UNITS;
|
|
1500
|
+
}
|
|
1501
|
+
static get shortUnits() {
|
|
1502
|
+
return DURATION_SHORT_UNITS;
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1500
1505
|
|
|
1501
1506
|
// src/oop/Semaphore.ts
|
|
1502
1507
|
var SemaphorePermit = class {
|
package/dist/radashi.d.cts
CHANGED
|
@@ -1769,13 +1769,13 @@ declare function callable<TValue, TObj extends Record<string | number | symbol,
|
|
|
1769
1769
|
*/
|
|
1770
1770
|
declare function chain<T1 extends any[], T2, T3>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3): (...arg: T1) => T3;
|
|
1771
1771
|
declare function chain<T1 extends any[], T2, T3, T4>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4): (...arg: T1) => T4;
|
|
1772
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1773
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1774
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1775
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1776
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1777
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1778
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1772
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5): (...arg: T1) => T5;
|
|
1773
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6): (...arg: T1) => T6;
|
|
1774
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7): (...arg: T1) => T7;
|
|
1775
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8): (...arg: T1) => T8;
|
|
1776
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9): (...arg: T1) => T9;
|
|
1777
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9, f9: (arg: T9) => T10): (...arg: T1) => T10;
|
|
1778
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9, f9: (arg: T9) => T10, f10: (arg: T10) => T11): (...arg: T1) => T11;
|
|
1779
1779
|
|
|
1780
1780
|
/**
|
|
1781
1781
|
* Create a function that composes multiple functions together. In a
|
|
@@ -3167,6 +3167,22 @@ type DurationShortUnit = keyof typeof DurationParser.shortUnits;
|
|
|
3167
3167
|
* A human-readable duration string.
|
|
3168
3168
|
*/
|
|
3169
3169
|
type DurationString<TUnit extends string = never, TShortUnit extends string = never> = QuantityString<DurationUnit | TUnit, DurationShortUnit | TShortUnit>;
|
|
3170
|
+
declare const DURATION_UNITS: {
|
|
3171
|
+
readonly week: 604800000;
|
|
3172
|
+
readonly day: 86400000;
|
|
3173
|
+
readonly hour: 3600000;
|
|
3174
|
+
readonly minute: 60000;
|
|
3175
|
+
readonly second: 1000;
|
|
3176
|
+
readonly millisecond: 1;
|
|
3177
|
+
};
|
|
3178
|
+
declare const DURATION_SHORT_UNITS: {
|
|
3179
|
+
readonly w: "week";
|
|
3180
|
+
readonly d: "day";
|
|
3181
|
+
readonly h: "hour";
|
|
3182
|
+
readonly m: "minute";
|
|
3183
|
+
readonly s: "second";
|
|
3184
|
+
readonly ms: "millisecond";
|
|
3185
|
+
};
|
|
3170
3186
|
/**
|
|
3171
3187
|
* Parses a duration string into its numeric value.
|
|
3172
3188
|
*
|
|
@@ -3179,22 +3195,8 @@ type DurationString<TUnit extends string = never, TShortUnit extends string = ne
|
|
|
3179
3195
|
*/
|
|
3180
3196
|
declare class DurationParser<TUnit extends string = never, TShortUnit extends string = never> extends QuantityParser<DurationUnit | TUnit, DurationShortUnit | TShortUnit> {
|
|
3181
3197
|
constructor(options?: DurationParser.Options<TUnit, TShortUnit>);
|
|
3182
|
-
static units:
|
|
3183
|
-
|
|
3184
|
-
readonly day: 86400000;
|
|
3185
|
-
readonly hour: 3600000;
|
|
3186
|
-
readonly minute: 60000;
|
|
3187
|
-
readonly second: 1000;
|
|
3188
|
-
readonly millisecond: 1;
|
|
3189
|
-
};
|
|
3190
|
-
static shortUnits: {
|
|
3191
|
-
readonly w: "week";
|
|
3192
|
-
readonly d: "day";
|
|
3193
|
-
readonly h: "hour";
|
|
3194
|
-
readonly m: "minute";
|
|
3195
|
-
readonly s: "second";
|
|
3196
|
-
readonly ms: "millisecond";
|
|
3197
|
-
};
|
|
3198
|
+
static get units(): typeof DURATION_UNITS;
|
|
3199
|
+
static get shortUnits(): typeof DURATION_SHORT_UNITS;
|
|
3198
3200
|
}
|
|
3199
3201
|
declare namespace DurationParser {
|
|
3200
3202
|
/**
|
package/dist/radashi.d.ts
CHANGED
|
@@ -1769,13 +1769,13 @@ declare function callable<TValue, TObj extends Record<string | number | symbol,
|
|
|
1769
1769
|
*/
|
|
1770
1770
|
declare function chain<T1 extends any[], T2, T3>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3): (...arg: T1) => T3;
|
|
1771
1771
|
declare function chain<T1 extends any[], T2, T3, T4>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4): (...arg: T1) => T4;
|
|
1772
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1773
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1774
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1775
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1776
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1777
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1778
|
-
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg:
|
|
1772
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5): (...arg: T1) => T5;
|
|
1773
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6): (...arg: T1) => T6;
|
|
1774
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7): (...arg: T1) => T7;
|
|
1775
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8): (...arg: T1) => T8;
|
|
1776
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9): (...arg: T1) => T9;
|
|
1777
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9, f9: (arg: T9) => T10): (...arg: T1) => T10;
|
|
1778
|
+
declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T4) => T5, f5: (arg: T5) => T6, f6: (arg: T6) => T7, f7: (arg: T7) => T8, f8: (arg: T8) => T9, f9: (arg: T9) => T10, f10: (arg: T10) => T11): (...arg: T1) => T11;
|
|
1779
1779
|
|
|
1780
1780
|
/**
|
|
1781
1781
|
* Create a function that composes multiple functions together. In a
|
|
@@ -3167,6 +3167,22 @@ type DurationShortUnit = keyof typeof DurationParser.shortUnits;
|
|
|
3167
3167
|
* A human-readable duration string.
|
|
3168
3168
|
*/
|
|
3169
3169
|
type DurationString<TUnit extends string = never, TShortUnit extends string = never> = QuantityString<DurationUnit | TUnit, DurationShortUnit | TShortUnit>;
|
|
3170
|
+
declare const DURATION_UNITS: {
|
|
3171
|
+
readonly week: 604800000;
|
|
3172
|
+
readonly day: 86400000;
|
|
3173
|
+
readonly hour: 3600000;
|
|
3174
|
+
readonly minute: 60000;
|
|
3175
|
+
readonly second: 1000;
|
|
3176
|
+
readonly millisecond: 1;
|
|
3177
|
+
};
|
|
3178
|
+
declare const DURATION_SHORT_UNITS: {
|
|
3179
|
+
readonly w: "week";
|
|
3180
|
+
readonly d: "day";
|
|
3181
|
+
readonly h: "hour";
|
|
3182
|
+
readonly m: "minute";
|
|
3183
|
+
readonly s: "second";
|
|
3184
|
+
readonly ms: "millisecond";
|
|
3185
|
+
};
|
|
3170
3186
|
/**
|
|
3171
3187
|
* Parses a duration string into its numeric value.
|
|
3172
3188
|
*
|
|
@@ -3179,22 +3195,8 @@ type DurationString<TUnit extends string = never, TShortUnit extends string = ne
|
|
|
3179
3195
|
*/
|
|
3180
3196
|
declare class DurationParser<TUnit extends string = never, TShortUnit extends string = never> extends QuantityParser<DurationUnit | TUnit, DurationShortUnit | TShortUnit> {
|
|
3181
3197
|
constructor(options?: DurationParser.Options<TUnit, TShortUnit>);
|
|
3182
|
-
static units:
|
|
3183
|
-
|
|
3184
|
-
readonly day: 86400000;
|
|
3185
|
-
readonly hour: 3600000;
|
|
3186
|
-
readonly minute: 60000;
|
|
3187
|
-
readonly second: 1000;
|
|
3188
|
-
readonly millisecond: 1;
|
|
3189
|
-
};
|
|
3190
|
-
static shortUnits: {
|
|
3191
|
-
readonly w: "week";
|
|
3192
|
-
readonly d: "day";
|
|
3193
|
-
readonly h: "hour";
|
|
3194
|
-
readonly m: "minute";
|
|
3195
|
-
readonly s: "second";
|
|
3196
|
-
readonly ms: "millisecond";
|
|
3197
|
-
};
|
|
3198
|
+
static get units(): typeof DURATION_UNITS;
|
|
3199
|
+
static get shortUnits(): typeof DURATION_SHORT_UNITS;
|
|
3198
3200
|
}
|
|
3199
3201
|
declare namespace DurationParser {
|
|
3200
3202
|
/**
|
package/dist/radashi.js
CHANGED
|
@@ -1464,21 +1464,7 @@ var QuantityParser = class {
|
|
|
1464
1464
|
};
|
|
1465
1465
|
|
|
1466
1466
|
// src/oop/DurationParser.ts
|
|
1467
|
-
var
|
|
1468
|
-
constructor(options) {
|
|
1469
|
-
super({
|
|
1470
|
-
units: {
|
|
1471
|
-
..._DurationParser.units,
|
|
1472
|
-
...options == null ? void 0 : options.units
|
|
1473
|
-
},
|
|
1474
|
-
short: {
|
|
1475
|
-
..._DurationParser.shortUnits,
|
|
1476
|
-
...options == null ? void 0 : options.short
|
|
1477
|
-
}
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
|
-
_DurationParser.units = {
|
|
1467
|
+
var DURATION_UNITS = {
|
|
1482
1468
|
week: 6048e5,
|
|
1483
1469
|
day: 864e5,
|
|
1484
1470
|
hour: 36e5,
|
|
@@ -1486,7 +1472,7 @@ _DurationParser.units = {
|
|
|
1486
1472
|
second: 1e3,
|
|
1487
1473
|
millisecond: 1
|
|
1488
1474
|
};
|
|
1489
|
-
|
|
1475
|
+
var DURATION_SHORT_UNITS = {
|
|
1490
1476
|
w: "week",
|
|
1491
1477
|
d: "day",
|
|
1492
1478
|
h: "hour",
|
|
@@ -1494,7 +1480,26 @@ _DurationParser.shortUnits = {
|
|
|
1494
1480
|
s: "second",
|
|
1495
1481
|
ms: "millisecond"
|
|
1496
1482
|
};
|
|
1497
|
-
var DurationParser = _DurationParser
|
|
1483
|
+
var DurationParser = class _DurationParser extends QuantityParser {
|
|
1484
|
+
constructor(options) {
|
|
1485
|
+
super({
|
|
1486
|
+
units: {
|
|
1487
|
+
..._DurationParser.units,
|
|
1488
|
+
...options == null ? void 0 : options.units
|
|
1489
|
+
},
|
|
1490
|
+
short: {
|
|
1491
|
+
..._DurationParser.shortUnits,
|
|
1492
|
+
...options == null ? void 0 : options.short
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
static get units() {
|
|
1497
|
+
return DURATION_UNITS;
|
|
1498
|
+
}
|
|
1499
|
+
static get shortUnits() {
|
|
1500
|
+
return DURATION_SHORT_UNITS;
|
|
1501
|
+
}
|
|
1502
|
+
};
|
|
1498
1503
|
|
|
1499
1504
|
// src/oop/Semaphore.ts
|
|
1500
1505
|
var SemaphorePermit = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "radashi",
|
|
3
|
-
"version": "12.7.
|
|
3
|
+
"version": "12.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The modern, community-first TypeScript toolkit with all of the fast, readable, and minimal utility functions you need. Type-safe, dependency-free, tree-shakeable, fully tested.",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"Ray Epps"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"packageManager": "pnpm@
|
|
15
|
+
"packageManager": "pnpm@10.29.3",
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=16.0.0"
|
|
18
18
|
},
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"test": "vitest run --coverage",
|
|
43
43
|
"test-branch": "node scripts/run test-branch",
|
|
44
44
|
"test-single": "node scripts/run test-single",
|
|
45
|
+
"tree-shake-check": "node scripts/run tree-shake",
|
|
45
46
|
"update-browserslist": "node scripts/run update-browserslist"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|