radashi 12.2.1 → 12.2.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 +10 -13
- package/dist/radashi.d.cts +29 -11
- package/dist/radashi.d.ts +29 -11
- package/dist/radashi.js +10 -13
- package/package.json +1 -1
package/dist/radashi.cjs
CHANGED
|
@@ -358,20 +358,17 @@ function zipToObject(keys2, values) {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
// src/async/AggregateError.ts
|
|
361
|
-
var AggregateErrorOrPolyfill = /* @__PURE__ */ (() =>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
this.stack = ((_b = errors.find((e) => e.stack)) == null ? void 0 : _b.stack) ?? this.stack;
|
|
371
|
-
this.errors = errors;
|
|
372
|
-
}
|
|
361
|
+
var AggregateErrorOrPolyfill = /* @__PURE__ */ (() => globalThis.AggregateError ?? class AggregateError extends Error {
|
|
362
|
+
constructor(errors = []) {
|
|
363
|
+
var _a, _b;
|
|
364
|
+
super();
|
|
365
|
+
const name = ((_a = errors.find((e) => e.name)) == null ? void 0 : _a.name) ?? "";
|
|
366
|
+
this.name = `AggregateError(${name}...)`;
|
|
367
|
+
this.message = `AggregateError with ${errors.length} errors`;
|
|
368
|
+
this.stack = ((_b = errors.find((e) => e.stack)) == null ? void 0 : _b.stack) ?? this.stack;
|
|
369
|
+
this.errors = errors;
|
|
373
370
|
}
|
|
374
|
-
)
|
|
371
|
+
})();
|
|
375
372
|
|
|
376
373
|
// src/async/all.ts
|
|
377
374
|
async function all(promises) {
|
package/dist/radashi.d.cts
CHANGED
|
@@ -125,8 +125,7 @@ declare function diff<T>(root: readonly T[], other: readonly T[], identity?: (it
|
|
|
125
125
|
* ```
|
|
126
126
|
* @version 12.1.0
|
|
127
127
|
*/
|
|
128
|
-
declare function first<
|
|
129
|
-
declare function first<T, U>(array: readonly T[], defaultValue: U): T | U;
|
|
128
|
+
declare function first<const TArray extends readonly any[], const TDefault = undefined>(array: TArray, defaultValue?: TDefault): TArray extends readonly [infer TFirst, ...any[]] ? TFirst : TArray[number] | TDefault;
|
|
130
129
|
|
|
131
130
|
/**
|
|
132
131
|
* Given an array of arrays, returns a single dimensional array with
|
|
@@ -220,8 +219,7 @@ declare function iterate<T>(count: number, func: (currentValue: T, iteration: nu
|
|
|
220
219
|
* ```
|
|
221
220
|
* @version 12.1.0
|
|
222
221
|
*/
|
|
223
|
-
declare function last<
|
|
224
|
-
declare function last<T, U>(array: readonly T[], defaultValue: U): T | U;
|
|
222
|
+
declare function last<const TArray extends readonly any[], const TDefault = undefined>(array: TArray, defaultValue?: TDefault): TArray extends readonly [...any[], infer TLast] ? TLast : TArray[number] | TDefault;
|
|
225
223
|
|
|
226
224
|
/**
|
|
227
225
|
* Creates a list of given start, end, value, and step parameters.
|
|
@@ -532,6 +530,14 @@ declare function zip<T1, T2>(array1: readonly T1[], array2: readonly T2[]): [T1,
|
|
|
532
530
|
*/
|
|
533
531
|
declare function zipToObject<K extends string | number | symbol, V>(keys: readonly K[], values: V | ((key: K, idx: number) => V) | readonly V[]): Record<K, V>;
|
|
534
532
|
|
|
533
|
+
interface AggregateError extends Error {
|
|
534
|
+
errors: any[];
|
|
535
|
+
}
|
|
536
|
+
interface AggregateErrorConstructor {
|
|
537
|
+
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
538
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
539
|
+
readonly prototype: AggregateError;
|
|
540
|
+
}
|
|
535
541
|
/**
|
|
536
542
|
* The `AggregateError` object represents an error when several errors
|
|
537
543
|
* need to be wrapped in a single error.
|
|
@@ -1978,7 +1984,7 @@ declare function upperize<T extends Record<string, any>>(obj: T): UppercaseKeys<
|
|
|
1978
1984
|
* ```
|
|
1979
1985
|
* @version 12.1.0
|
|
1980
1986
|
*/
|
|
1981
|
-
declare function draw<T>(array: readonly T[]
|
|
1987
|
+
declare function draw<const T extends readonly any[]>(array: T): T extends readonly [any, ...any[]] ? T[number] : T[number] | null;
|
|
1982
1988
|
|
|
1983
1989
|
/**
|
|
1984
1990
|
* Generates a random integer between min and max. Both min and max
|
|
@@ -2238,15 +2244,14 @@ declare function isDate(value: unknown): value is Date;
|
|
|
2238
2244
|
|
|
2239
2245
|
/**
|
|
2240
2246
|
* Return true if the given value is empty.
|
|
2247
|
+
* This function also uses [Type Guards](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) to ensure type safety
|
|
2241
2248
|
*
|
|
2242
2249
|
* Empty values include:
|
|
2243
2250
|
* - `null`
|
|
2244
2251
|
* - `undefined`
|
|
2245
2252
|
* - `0`
|
|
2246
|
-
* -
|
|
2247
|
-
* -
|
|
2248
|
-
* - `[]`
|
|
2249
|
-
* - `{}`
|
|
2253
|
+
* - empty string
|
|
2254
|
+
* - empty array
|
|
2250
2255
|
* - invalid `Date` time
|
|
2251
2256
|
* - object with `length` property of `0`
|
|
2252
2257
|
* - object with `size` property of `0`
|
|
@@ -2263,7 +2268,20 @@ declare function isDate(value: unknown): value is Date;
|
|
|
2263
2268
|
* ```
|
|
2264
2269
|
* @version 12.1.0
|
|
2265
2270
|
*/
|
|
2266
|
-
declare function isEmpty(value:
|
|
2271
|
+
declare function isEmpty<T extends ToEmptyAble>(value: T): value is ToEmpty<T>;
|
|
2272
|
+
declare function isEmpty(value: unknown): boolean;
|
|
2273
|
+
type NeverEmpty = symbol | Function;
|
|
2274
|
+
/**
|
|
2275
|
+
* A type that can be narrowed by `isEmpty`.
|
|
2276
|
+
*/
|
|
2277
|
+
type ToEmptyAble = NeverEmpty | boolean | number | string | readonly any[] | null | undefined;
|
|
2278
|
+
/**
|
|
2279
|
+
* Narrow a type to an empty value.
|
|
2280
|
+
*
|
|
2281
|
+
* Due to TypeScript limitations, object types cannot be narrowed,
|
|
2282
|
+
* except for arrays and functions.
|
|
2283
|
+
*/
|
|
2284
|
+
type ToEmpty<T extends ToEmptyAble> = (T extends any[] ? never[] : Extract<false | 0 | '' | readonly never[] | null | undefined, T>) extends infer U ? Extract<U, T> : never;
|
|
2267
2285
|
|
|
2268
2286
|
/**
|
|
2269
2287
|
* Return true if the given values are equal.
|
|
@@ -3361,4 +3379,4 @@ type GlobalObjectType<Identifier extends string> = [Identifier] extends [Any] ?
|
|
|
3361
3379
|
[P in Identifier]: any;
|
|
3362
3380
|
} ? InstanceType<(typeof globalThis)[Identifier]> : never;
|
|
3363
3381
|
|
|
3364
|
-
export { AggregateErrorOrPolyfill as AggregateError, Any, type Assign, type BoxedPrimitive, type BuiltInType, type CastArray, type CastArrayIfExists, type CloningStrategy, type Comparable, type ComparableProperty, type Comparator, type ComparatorMapping, type CompatibleProperty, type Crush, type CustomClass, type CustomClassRegistry, type DebounceFunction, type DebounceOptions, DefaultCloningStrategy, type Err, type ExtractArray, type ExtractMap, type ExtractNotAny, type ExtractSet, type Falsy, FastCloningStrategy, type FilteredKeys, type Flip, type Intersect, type IsExactType, type KeyFilter, type KeyFilterFunction, type LowercaseKeys, type MappedInput, type MappedOutput, type Mapping, type MappingFunction, type MemoOptions, type NoInfer, type Ok, type OnceFunction, type OptionalKeys, type OptionalMapping, type Primitive, type RequiredKeys, type Result, type ResultPromise, type RetryOptions, type Series, type Simplify, type StrictExtract, type SwitchAny, type SwitchNever, type ThrottledFunction, type TraverseContext, type TraverseOptions, type TraverseVisitor, type TryitResult, type TypedArray, type UppercaseKeys, all, alphabetical, always, assign, boil, callable, camel, capitalize, castArray, castArrayIfExists, castComparator, castMapping, chain, clamp, clone, cloneDeep, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, filterKey, first, flat, flip, fork, get, group, guard, inRange, intersects, invert, isArray, isBoolean, isDate, isEmpty, isEqual, isError, isFloat, isFunction, isInt, isIntString, isIterable, isMap, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isResult, isResultErr, isResultOk, isSet, isString, isSymbol, isTagged, isWeakMap, isWeakSet, iterate, keys, last, lerp, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, mapify, max, memo, merge, min, noop, objectify, omit, once, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, round, select, selectFirst, series, set, shake, shift, shuffle, sift, similarity, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, traverse, trim, tryit as try, tryit, uid, unique, unzip, upperize, withResolvers, zip, zipToObject };
|
|
3382
|
+
export { AggregateErrorOrPolyfill as AggregateError, Any, type Assign, type BoxedPrimitive, type BuiltInType, type CastArray, type CastArrayIfExists, type CloningStrategy, type Comparable, type ComparableProperty, type Comparator, type ComparatorMapping, type CompatibleProperty, type Crush, type CustomClass, type CustomClassRegistry, type DebounceFunction, type DebounceOptions, DefaultCloningStrategy, type Err, type ExtractArray, type ExtractMap, type ExtractNotAny, type ExtractSet, type Falsy, FastCloningStrategy, type FilteredKeys, type Flip, type Intersect, type IsExactType, type KeyFilter, type KeyFilterFunction, type LowercaseKeys, type MappedInput, type MappedOutput, type Mapping, type MappingFunction, type MemoOptions, type NoInfer, type Ok, type OnceFunction, type OptionalKeys, type OptionalMapping, type Primitive, type PromiseWithResolvers, type RequiredKeys, type Result, type ResultPromise, type RetryOptions, type Series, type Simplify, type StrictExtract, type SwitchAny, type SwitchNever, type ThrottledFunction, type ToEmpty, type ToEmptyAble, type TraverseContext, type TraverseOptions, type TraverseVisitor, type TryitResult, type TypedArray, type UppercaseKeys, all, alphabetical, always, assign, boil, callable, camel, capitalize, castArray, castArrayIfExists, castComparator, castMapping, chain, clamp, clone, cloneDeep, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, filterKey, first, flat, flip, fork, get, group, guard, inRange, intersects, invert, isArray, isBoolean, isDate, isEmpty, isEqual, isError, isFloat, isFunction, isInt, isIntString, isIterable, isMap, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isResult, isResultErr, isResultOk, isSet, isString, isSymbol, isTagged, isWeakMap, isWeakSet, iterate, keys, last, lerp, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, mapify, max, memo, merge, min, noop, objectify, omit, once, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, round, select, selectFirst, series, set, shake, shift, shuffle, sift, similarity, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, traverse, trim, tryit as try, tryit, uid, unique, unzip, upperize, withResolvers, zip, zipToObject };
|
package/dist/radashi.d.ts
CHANGED
|
@@ -125,8 +125,7 @@ declare function diff<T>(root: readonly T[], other: readonly T[], identity?: (it
|
|
|
125
125
|
* ```
|
|
126
126
|
* @version 12.1.0
|
|
127
127
|
*/
|
|
128
|
-
declare function first<
|
|
129
|
-
declare function first<T, U>(array: readonly T[], defaultValue: U): T | U;
|
|
128
|
+
declare function first<const TArray extends readonly any[], const TDefault = undefined>(array: TArray, defaultValue?: TDefault): TArray extends readonly [infer TFirst, ...any[]] ? TFirst : TArray[number] | TDefault;
|
|
130
129
|
|
|
131
130
|
/**
|
|
132
131
|
* Given an array of arrays, returns a single dimensional array with
|
|
@@ -220,8 +219,7 @@ declare function iterate<T>(count: number, func: (currentValue: T, iteration: nu
|
|
|
220
219
|
* ```
|
|
221
220
|
* @version 12.1.0
|
|
222
221
|
*/
|
|
223
|
-
declare function last<
|
|
224
|
-
declare function last<T, U>(array: readonly T[], defaultValue: U): T | U;
|
|
222
|
+
declare function last<const TArray extends readonly any[], const TDefault = undefined>(array: TArray, defaultValue?: TDefault): TArray extends readonly [...any[], infer TLast] ? TLast : TArray[number] | TDefault;
|
|
225
223
|
|
|
226
224
|
/**
|
|
227
225
|
* Creates a list of given start, end, value, and step parameters.
|
|
@@ -532,6 +530,14 @@ declare function zip<T1, T2>(array1: readonly T1[], array2: readonly T2[]): [T1,
|
|
|
532
530
|
*/
|
|
533
531
|
declare function zipToObject<K extends string | number | symbol, V>(keys: readonly K[], values: V | ((key: K, idx: number) => V) | readonly V[]): Record<K, V>;
|
|
534
532
|
|
|
533
|
+
interface AggregateError extends Error {
|
|
534
|
+
errors: any[];
|
|
535
|
+
}
|
|
536
|
+
interface AggregateErrorConstructor {
|
|
537
|
+
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
538
|
+
(errors: Iterable<any>, message?: string): AggregateError;
|
|
539
|
+
readonly prototype: AggregateError;
|
|
540
|
+
}
|
|
535
541
|
/**
|
|
536
542
|
* The `AggregateError` object represents an error when several errors
|
|
537
543
|
* need to be wrapped in a single error.
|
|
@@ -1978,7 +1984,7 @@ declare function upperize<T extends Record<string, any>>(obj: T): UppercaseKeys<
|
|
|
1978
1984
|
* ```
|
|
1979
1985
|
* @version 12.1.0
|
|
1980
1986
|
*/
|
|
1981
|
-
declare function draw<T>(array: readonly T[]
|
|
1987
|
+
declare function draw<const T extends readonly any[]>(array: T): T extends readonly [any, ...any[]] ? T[number] : T[number] | null;
|
|
1982
1988
|
|
|
1983
1989
|
/**
|
|
1984
1990
|
* Generates a random integer between min and max. Both min and max
|
|
@@ -2238,15 +2244,14 @@ declare function isDate(value: unknown): value is Date;
|
|
|
2238
2244
|
|
|
2239
2245
|
/**
|
|
2240
2246
|
* Return true if the given value is empty.
|
|
2247
|
+
* This function also uses [Type Guards](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) to ensure type safety
|
|
2241
2248
|
*
|
|
2242
2249
|
* Empty values include:
|
|
2243
2250
|
* - `null`
|
|
2244
2251
|
* - `undefined`
|
|
2245
2252
|
* - `0`
|
|
2246
|
-
* -
|
|
2247
|
-
* -
|
|
2248
|
-
* - `[]`
|
|
2249
|
-
* - `{}`
|
|
2253
|
+
* - empty string
|
|
2254
|
+
* - empty array
|
|
2250
2255
|
* - invalid `Date` time
|
|
2251
2256
|
* - object with `length` property of `0`
|
|
2252
2257
|
* - object with `size` property of `0`
|
|
@@ -2263,7 +2268,20 @@ declare function isDate(value: unknown): value is Date;
|
|
|
2263
2268
|
* ```
|
|
2264
2269
|
* @version 12.1.0
|
|
2265
2270
|
*/
|
|
2266
|
-
declare function isEmpty(value:
|
|
2271
|
+
declare function isEmpty<T extends ToEmptyAble>(value: T): value is ToEmpty<T>;
|
|
2272
|
+
declare function isEmpty(value: unknown): boolean;
|
|
2273
|
+
type NeverEmpty = symbol | Function;
|
|
2274
|
+
/**
|
|
2275
|
+
* A type that can be narrowed by `isEmpty`.
|
|
2276
|
+
*/
|
|
2277
|
+
type ToEmptyAble = NeverEmpty | boolean | number | string | readonly any[] | null | undefined;
|
|
2278
|
+
/**
|
|
2279
|
+
* Narrow a type to an empty value.
|
|
2280
|
+
*
|
|
2281
|
+
* Due to TypeScript limitations, object types cannot be narrowed,
|
|
2282
|
+
* except for arrays and functions.
|
|
2283
|
+
*/
|
|
2284
|
+
type ToEmpty<T extends ToEmptyAble> = (T extends any[] ? never[] : Extract<false | 0 | '' | readonly never[] | null | undefined, T>) extends infer U ? Extract<U, T> : never;
|
|
2267
2285
|
|
|
2268
2286
|
/**
|
|
2269
2287
|
* Return true if the given values are equal.
|
|
@@ -3361,4 +3379,4 @@ type GlobalObjectType<Identifier extends string> = [Identifier] extends [Any] ?
|
|
|
3361
3379
|
[P in Identifier]: any;
|
|
3362
3380
|
} ? InstanceType<(typeof globalThis)[Identifier]> : never;
|
|
3363
3381
|
|
|
3364
|
-
export { AggregateErrorOrPolyfill as AggregateError, Any, type Assign, type BoxedPrimitive, type BuiltInType, type CastArray, type CastArrayIfExists, type CloningStrategy, type Comparable, type ComparableProperty, type Comparator, type ComparatorMapping, type CompatibleProperty, type Crush, type CustomClass, type CustomClassRegistry, type DebounceFunction, type DebounceOptions, DefaultCloningStrategy, type Err, type ExtractArray, type ExtractMap, type ExtractNotAny, type ExtractSet, type Falsy, FastCloningStrategy, type FilteredKeys, type Flip, type Intersect, type IsExactType, type KeyFilter, type KeyFilterFunction, type LowercaseKeys, type MappedInput, type MappedOutput, type Mapping, type MappingFunction, type MemoOptions, type NoInfer, type Ok, type OnceFunction, type OptionalKeys, type OptionalMapping, type Primitive, type RequiredKeys, type Result, type ResultPromise, type RetryOptions, type Series, type Simplify, type StrictExtract, type SwitchAny, type SwitchNever, type ThrottledFunction, type TraverseContext, type TraverseOptions, type TraverseVisitor, type TryitResult, type TypedArray, type UppercaseKeys, all, alphabetical, always, assign, boil, callable, camel, capitalize, castArray, castArrayIfExists, castComparator, castMapping, chain, clamp, clone, cloneDeep, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, filterKey, first, flat, flip, fork, get, group, guard, inRange, intersects, invert, isArray, isBoolean, isDate, isEmpty, isEqual, isError, isFloat, isFunction, isInt, isIntString, isIterable, isMap, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isResult, isResultErr, isResultOk, isSet, isString, isSymbol, isTagged, isWeakMap, isWeakSet, iterate, keys, last, lerp, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, mapify, max, memo, merge, min, noop, objectify, omit, once, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, round, select, selectFirst, series, set, shake, shift, shuffle, sift, similarity, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, traverse, trim, tryit as try, tryit, uid, unique, unzip, upperize, withResolvers, zip, zipToObject };
|
|
3382
|
+
export { AggregateErrorOrPolyfill as AggregateError, Any, type Assign, type BoxedPrimitive, type BuiltInType, type CastArray, type CastArrayIfExists, type CloningStrategy, type Comparable, type ComparableProperty, type Comparator, type ComparatorMapping, type CompatibleProperty, type Crush, type CustomClass, type CustomClassRegistry, type DebounceFunction, type DebounceOptions, DefaultCloningStrategy, type Err, type ExtractArray, type ExtractMap, type ExtractNotAny, type ExtractSet, type Falsy, FastCloningStrategy, type FilteredKeys, type Flip, type Intersect, type IsExactType, type KeyFilter, type KeyFilterFunction, type LowercaseKeys, type MappedInput, type MappedOutput, type Mapping, type MappingFunction, type MemoOptions, type NoInfer, type Ok, type OnceFunction, type OptionalKeys, type OptionalMapping, type Primitive, type PromiseWithResolvers, type RequiredKeys, type Result, type ResultPromise, type RetryOptions, type Series, type Simplify, type StrictExtract, type SwitchAny, type SwitchNever, type ThrottledFunction, type ToEmpty, type ToEmptyAble, type TraverseContext, type TraverseOptions, type TraverseVisitor, type TryitResult, type TypedArray, type UppercaseKeys, all, alphabetical, always, assign, boil, callable, camel, capitalize, castArray, castArrayIfExists, castComparator, castMapping, chain, clamp, clone, cloneDeep, cluster, compose, construct, counting, crush, dash, debounce, defer, diff, draw, filterKey, first, flat, flip, fork, get, group, guard, inRange, intersects, invert, isArray, isBoolean, isDate, isEmpty, isEqual, isError, isFloat, isFunction, isInt, isIntString, isIterable, isMap, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isResult, isResultErr, isResultOk, isSet, isString, isSymbol, isTagged, isWeakMap, isWeakSet, iterate, keys, last, lerp, list, listify, lowerize, map, mapEntries, mapKeys, mapValues, mapify, max, memo, merge, min, noop, objectify, omit, once, parallel, partial, partob, pascal, pick, proxied, random, range, reduce, replace, replaceOrAppend, retry, round, select, selectFirst, series, set, shake, shift, shuffle, sift, similarity, sleep, snake, sort, sum, template, throttle, title, toFloat, toInt, toggle, traverse, trim, tryit as try, tryit, uid, unique, unzip, upperize, withResolvers, zip, zipToObject };
|
package/dist/radashi.js
CHANGED
|
@@ -356,20 +356,17 @@ function zipToObject(keys2, values) {
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
// src/async/AggregateError.ts
|
|
359
|
-
var AggregateErrorOrPolyfill = /* @__PURE__ */ (() =>
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
this.stack = ((_b = errors.find((e) => e.stack)) == null ? void 0 : _b.stack) ?? this.stack;
|
|
369
|
-
this.errors = errors;
|
|
370
|
-
}
|
|
359
|
+
var AggregateErrorOrPolyfill = /* @__PURE__ */ (() => globalThis.AggregateError ?? class AggregateError extends Error {
|
|
360
|
+
constructor(errors = []) {
|
|
361
|
+
var _a, _b;
|
|
362
|
+
super();
|
|
363
|
+
const name = ((_a = errors.find((e) => e.name)) == null ? void 0 : _a.name) ?? "";
|
|
364
|
+
this.name = `AggregateError(${name}...)`;
|
|
365
|
+
this.message = `AggregateError with ${errors.length} errors`;
|
|
366
|
+
this.stack = ((_b = errors.find((e) => e.stack)) == null ? void 0 : _b.stack) ?? this.stack;
|
|
367
|
+
this.errors = errors;
|
|
371
368
|
}
|
|
372
|
-
)
|
|
369
|
+
})();
|
|
373
370
|
|
|
374
371
|
// src/async/all.ts
|
|
375
372
|
async function all(promises) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "radashi",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.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": {
|