@getlang/utils
Advanced tools
Comparing version 0.0.8 to 0.0.14
@@ -71,1 +71,2 @@ export class RuntimeError extends Error { | ||
} | ||
//# sourceMappingURL=errors.js.map |
@@ -1,6 +0,3 @@ | ||
export * from './scope'; | ||
export * from './errors'; | ||
export * from './types'; | ||
export type MaybePromise<T> = T | Promise<T>; | ||
export declare function wait<V, X>(value: MaybePromise<V>, then: (value: V) => X): MaybePromise<X>; | ||
export declare function waitMap<V, X>(values: V[], mapper: (value: V) => MaybePromise<X>): MaybePromise<X[]>; | ||
export * from './wait.js'; | ||
export * from './errors.js'; | ||
export * from './hooks.js'; |
@@ -1,17 +0,4 @@ | ||
export * from './scope'; | ||
export * from './errors'; | ||
export * from './types'; | ||
export function wait(value, then) { | ||
return value instanceof Promise ? value.then(then) : then(value); | ||
} | ||
export function waitMap(values, mapper) { | ||
return values.reduce((acc, value) => acc instanceof Promise | ||
? acc.then(async (acc) => { | ||
acc.push(await mapper(value)); | ||
return acc; | ||
}) | ||
: wait(mapper(value), value => { | ||
acc.push(value); | ||
return acc; | ||
}), []); | ||
} | ||
export * from './wait.js'; | ||
export * from './errors.js'; | ||
export * from './hooks.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@getlang/utils", | ||
"version": "0.0.8", | ||
"version": "0.0.14", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"main": "dist", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
"bun": "./index.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"bugs": { | ||
@@ -11,0 +11,0 @@ "url": "https://github.com/getlang-dev/get/issues" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12438
17
285