ciorent 1.0.4 → 1.0.5
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/bench/await.bench.ts +29 -0
- package/bench/bun.lock +38 -0
- package/bench/package.json +11 -0
- package/bench/promise-all.bench.ts +42 -0
- package/bench/semaphore.bench.ts +101 -0
- package/bench/shallow-clone.bench.ts +69 -0
- package/bench/tsconfig.json +3 -0
- package/biome.json +62 -0
- package/bun.lock +117 -0
- package/package.json +36 -19
- package/scripts/bench.ts +38 -0
- package/scripts/build.ts +62 -0
- package/scripts/publish.ts +4 -0
- package/scripts/report-size.ts +33 -0
- package/scripts/task.ts +8 -0
- package/scripts/tsconfig.json +12 -0
- package/scripts/tsconfig.ts +16 -0
- package/scripts/utils.ts +15 -0
- package/src/index.ts +96 -0
- package/src/mutex.ts +44 -0
- package/src/rate-limit.ts +64 -0
- package/src/semaphore.ts +74 -0
- package/src/signal.ts +71 -0
- package/src/utils.ts +16 -0
- package/tsconfig.json +42 -0
- package/index.d.ts +0 -44
- package/index.js +0 -1
- package/mutex.d.ts +0 -17
- package/mutex.js +0 -1
- package/rate-limit.d.ts +0 -22
- package/rate-limit.js +0 -1
- package/semaphore.d.ts +0 -39
- package/semaphore.js +0 -1
- package/signal.d.ts +0 -41
- package/signal.js +0 -1
- package/utils.d.ts +0 -10
- package/utils.js +0 -1
package/utils.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type Extend<T extends any[]> = [...T, ...any[]];
|
|
2
|
-
export declare let loadedResolve: (res?: any) => void;
|
|
3
|
-
export declare let loadedReject: (reason?: any) => void;
|
|
4
|
-
export declare const loadResolvers: (res: (value?: any) => void, rej: (reason?: any) => void) => void;
|
|
5
|
-
export declare const loadResolve: (res: (value?: any) => void) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Unswallow promise error.
|
|
8
|
-
*/
|
|
9
|
-
export declare const unswallow: (p: Promise<any>) => Promise<any>;
|
|
10
|
-
export declare const chainLock: (lock: Promise<void>, fn: any, ...args: any[]) => Promise<any>;
|
package/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export let loadedResolve;export let loadedReject;export let loadResolvers=(res,rej)=>{loadedResolve=res;loadedReject=rej};export let loadResolve=res=>{loadedResolve=res};export let unswallow=async p=>p;export let chainLock=async(lock,fn,...args)=>{try{await lock}catch{unswallow(lock)}return fn(...args)};
|