foxts 3.15.0 → 4.0.0-beta.1

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.
Files changed (207) hide show
  1. package/dist/add-array-elements-to-set/index.js +1 -0
  2. package/dist/add-array-elements-to-set/index.mjs +1 -0
  3. package/dist/ahocorasick/index.js +1 -0
  4. package/dist/ahocorasick/index.mjs +1 -0
  5. package/dist/append-array-in-place/index.js +1 -0
  6. package/dist/append-array-in-place/index.mjs +1 -0
  7. package/dist/append-set-elements-to-array/index.js +1 -0
  8. package/dist/append-set-elements-to-array/index.mjs +1 -0
  9. package/dist/async-write-to-stream/index.js +1 -0
  10. package/dist/{async-write-to-stream.mjs → async-write-to-stream/index.mjs} +1 -1
  11. package/dist/{available-parallelism.d.ts → available-parallelism/index.d.ts} +1 -1
  12. package/dist/available-parallelism/index.js +1 -0
  13. package/dist/{available-parallelism.mjs → available-parallelism/index.mjs} +1 -1
  14. package/dist/bitwise/index.js +1 -0
  15. package/dist/bitwise/index.mjs +1 -0
  16. package/dist/chunk/index.js +1 -0
  17. package/dist/chunk/index.mjs +1 -0
  18. package/dist/compare-source/index.js +1 -0
  19. package/dist/compare-source/index.mjs +1 -0
  20. package/dist/create-fixed-array/index.js +1 -0
  21. package/dist/create-fixed-array/index.mjs +1 -0
  22. package/dist/define-lazy-property/index.js +1 -0
  23. package/dist/define-lazy-property/index.mjs +1 -0
  24. package/dist/detect-eol/index.js +1 -0
  25. package/dist/detect-eol/index.mjs +1 -0
  26. package/dist/empty-node/index.js +1 -0
  27. package/dist/empty-node/index.mjs +1 -0
  28. package/dist/{escape-html.d.ts → escape-html/index.d.ts} +1 -0
  29. package/dist/escape-html/index.js +1 -0
  30. package/dist/escape-html/index.mjs +1 -0
  31. package/dist/escape-string-regexp/index.js +1 -0
  32. package/dist/{escape-string-regexp.mjs → escape-string-regexp/index.mjs} +1 -1
  33. package/dist/extract-error-message/index.js +1 -0
  34. package/dist/{extract-error-message.mjs → extract-error-message/index.mjs} +1 -1
  35. package/dist/fast-ip-version/index.js +1 -0
  36. package/dist/{fast-ip-version.mjs → fast-ip-version/index.mjs} +1 -1
  37. package/dist/fast-string-array-join/index.js +1 -0
  38. package/dist/fast-string-array-join/index.mjs +1 -0
  39. package/dist/fast-string-compare/index.d.ts +12 -0
  40. package/dist/fast-string-compare/index.js +1 -0
  41. package/dist/fast-string-compare/index.mjs +1 -0
  42. package/dist/fifo/index.js +1 -0
  43. package/dist/fifo/index.mjs +1 -0
  44. package/dist/fnv1a/index.js +1 -0
  45. package/dist/{fnv1a.mjs → fnv1a/index.mjs} +1 -1
  46. package/dist/fnv1a52/index.js +1 -0
  47. package/dist/fnv1a52/index.mjs +1 -0
  48. package/dist/guard/index.js +1 -0
  49. package/dist/guard/index.mjs +1 -0
  50. package/dist/{headers-to-object.d.ts → headers-to-object/index.d.ts} +1 -1
  51. package/dist/headers-to-object/index.js +1 -0
  52. package/dist/headers-to-object/index.mjs +1 -0
  53. package/dist/identity/index.js +1 -0
  54. package/dist/identity/index.mjs +1 -0
  55. package/dist/is-function/index.js +1 -0
  56. package/dist/is-function/index.mjs +1 -0
  57. package/dist/is-probably-ip/index.js +1 -0
  58. package/dist/is-probably-ip/index.mjs +1 -0
  59. package/dist/lazy-promise/index.js +1 -0
  60. package/dist/lazy-promise/index.mjs +1 -0
  61. package/dist/lazy-value/index.js +1 -0
  62. package/dist/lazy-value/index.mjs +1 -0
  63. package/dist/merge-headers/index.js +1 -0
  64. package/dist/merge-headers/index.mjs +1 -0
  65. package/dist/noop/index.js +1 -0
  66. package/dist/noop/index.mjs +1 -0
  67. package/dist/once/index.js +1 -0
  68. package/dist/{once.mjs → once/index.mjs} +1 -1
  69. package/dist/pick-random/index.js +1 -0
  70. package/dist/pick-random/index.mjs +1 -0
  71. package/dist/random-int/index.js +1 -0
  72. package/dist/random-int/index.mjs +1 -0
  73. package/dist/repool/index.js +1 -0
  74. package/dist/repool/index.mjs +1 -0
  75. package/dist/{retrie.d.ts → retrie/index.d.ts} +2 -2
  76. package/dist/retrie/index.js +1 -0
  77. package/dist/retrie/index.mjs +1 -0
  78. package/dist/shuffle-array/index.js +1 -0
  79. package/dist/shuffle-array/index.mjs +1 -0
  80. package/dist/simple-string-hash/index.js +1 -0
  81. package/dist/simple-string-hash/index.mjs +1 -0
  82. package/dist/string-join/index.js +1 -0
  83. package/dist/string-join/index.mjs +1 -0
  84. package/dist/tagged/index.js +1 -0
  85. package/dist/{tagged.mjs → tagged/index.mjs} +1 -1
  86. package/dist/text-line-stream/index.js +1 -0
  87. package/dist/text-line-stream/index.mjs +1 -0
  88. package/dist/uint8array-utils/index.d.ts +6 -0
  89. package/dist/uint8array-utils/index.js +1 -0
  90. package/dist/uint8array-utils/index.mjs +1 -0
  91. package/dist/wait/index.js +1 -0
  92. package/dist/wait/index.mjs +1 -0
  93. package/package.json +106 -98
  94. package/dist/add-array-elements-to-set.js +0 -1
  95. package/dist/add-array-elements-to-set.mjs +0 -1
  96. package/dist/ahocorasick.js +0 -1
  97. package/dist/ahocorasick.mjs +0 -1
  98. package/dist/append-array-in-place.js +0 -1
  99. package/dist/append-array-in-place.mjs +0 -1
  100. package/dist/append-set-elements-to-array.js +0 -1
  101. package/dist/append-set-elements-to-array.mjs +0 -1
  102. package/dist/async-write-to-stream.js +0 -1
  103. package/dist/available-parallelism.js +0 -1
  104. package/dist/bitwise.js +0 -1
  105. package/dist/bitwise.mjs +0 -1
  106. package/dist/chunk.js +0 -1
  107. package/dist/chunk.mjs +0 -1
  108. package/dist/compare-source.js +0 -1
  109. package/dist/compare-source.mjs +0 -1
  110. package/dist/create-fixed-array.js +0 -1
  111. package/dist/create-fixed-array.mjs +0 -1
  112. package/dist/define-lazy-property.js +0 -1
  113. package/dist/define-lazy-property.mjs +0 -1
  114. package/dist/detect-eol.js +0 -1
  115. package/dist/detect-eol.mjs +0 -1
  116. package/dist/empty-node.js +0 -1
  117. package/dist/empty-node.mjs +0 -1
  118. package/dist/escape-html.js +0 -1
  119. package/dist/escape-html.mjs +0 -1
  120. package/dist/escape-string-regexp.js +0 -1
  121. package/dist/extract-error-message.js +0 -1
  122. package/dist/fast-ip-version.js +0 -1
  123. package/dist/fast-string-array-join.js +0 -1
  124. package/dist/fast-string-array-join.mjs +0 -1
  125. package/dist/fifo.js +0 -1
  126. package/dist/fifo.mjs +0 -1
  127. package/dist/fnv1a.js +0 -1
  128. package/dist/fnv1a52.js +0 -1
  129. package/dist/fnv1a52.mjs +0 -1
  130. package/dist/guard.js +0 -1
  131. package/dist/guard.mjs +0 -1
  132. package/dist/headers-to-object.js +0 -1
  133. package/dist/headers-to-object.mjs +0 -1
  134. package/dist/identity.js +0 -1
  135. package/dist/identity.mjs +0 -1
  136. package/dist/is-function.js +0 -1
  137. package/dist/is-function.mjs +0 -1
  138. package/dist/is-probably-ip.js +0 -1
  139. package/dist/is-probably-ip.mjs +0 -1
  140. package/dist/lazy-promise.js +0 -1
  141. package/dist/lazy-promise.mjs +0 -1
  142. package/dist/lazy-value.js +0 -1
  143. package/dist/lazy-value.mjs +0 -1
  144. package/dist/merge-headers.js +0 -1
  145. package/dist/merge-headers.mjs +0 -1
  146. package/dist/noop.js +0 -1
  147. package/dist/noop.mjs +0 -1
  148. package/dist/once.js +0 -1
  149. package/dist/pick-random.js +0 -1
  150. package/dist/pick-random.mjs +0 -1
  151. package/dist/random-int.js +0 -1
  152. package/dist/random-int.mjs +0 -1
  153. package/dist/repool.js +0 -1
  154. package/dist/repool.mjs +0 -1
  155. package/dist/retrie.js +0 -1
  156. package/dist/retrie.mjs +0 -1
  157. package/dist/serialized-memo.d.ts +0 -60
  158. package/dist/serialized-memo.js +0 -1
  159. package/dist/serialized-memo.mjs +0 -1
  160. package/dist/shuffle-array.js +0 -1
  161. package/dist/shuffle-array.mjs +0 -1
  162. package/dist/simple-string-hash.js +0 -1
  163. package/dist/simple-string-hash.mjs +0 -1
  164. package/dist/string-join.js +0 -1
  165. package/dist/string-join.mjs +0 -1
  166. package/dist/tagged.js +0 -1
  167. package/dist/text-line-stream.js +0 -1
  168. package/dist/text-line-stream.mjs +0 -1
  169. package/dist/wait.js +0 -1
  170. package/dist/wait.mjs +0 -1
  171. /package/dist/{add-array-elements-to-set.d.ts → add-array-elements-to-set/index.d.ts} +0 -0
  172. /package/dist/{ahocorasick.d.ts → ahocorasick/index.d.ts} +0 -0
  173. /package/dist/{append-array-in-place.d.ts → append-array-in-place/index.d.ts} +0 -0
  174. /package/dist/{append-set-elements-to-array.d.ts → append-set-elements-to-array/index.d.ts} +0 -0
  175. /package/dist/{async-write-to-stream.d.ts → async-write-to-stream/index.d.ts} +0 -0
  176. /package/dist/{bitwise.d.ts → bitwise/index.d.ts} +0 -0
  177. /package/dist/{chunk.d.ts → chunk/index.d.ts} +0 -0
  178. /package/dist/{compare-source.d.ts → compare-source/index.d.ts} +0 -0
  179. /package/dist/{create-fixed-array.d.ts → create-fixed-array/index.d.ts} +0 -0
  180. /package/dist/{define-lazy-property.d.ts → define-lazy-property/index.d.ts} +0 -0
  181. /package/dist/{detect-eol.d.ts → detect-eol/index.d.ts} +0 -0
  182. /package/dist/{empty-node.d.ts → empty-node/index.d.ts} +0 -0
  183. /package/dist/{escape-string-regexp.d.ts → escape-string-regexp/index.d.ts} +0 -0
  184. /package/dist/{extract-error-message.d.ts → extract-error-message/index.d.ts} +0 -0
  185. /package/dist/{fast-ip-version.d.ts → fast-ip-version/index.d.ts} +0 -0
  186. /package/dist/{fast-string-array-join.d.ts → fast-string-array-join/index.d.ts} +0 -0
  187. /package/dist/{fifo.d.ts → fifo/index.d.ts} +0 -0
  188. /package/dist/{fnv1a.d.ts → fnv1a/index.d.ts} +0 -0
  189. /package/dist/{fnv1a52.d.ts → fnv1a52/index.d.ts} +0 -0
  190. /package/dist/{guard.d.ts → guard/index.d.ts} +0 -0
  191. /package/dist/{identity.d.ts → identity/index.d.ts} +0 -0
  192. /package/dist/{is-function.d.ts → is-function/index.d.ts} +0 -0
  193. /package/dist/{is-probably-ip.d.ts → is-probably-ip/index.d.ts} +0 -0
  194. /package/dist/{lazy-promise.d.ts → lazy-promise/index.d.ts} +0 -0
  195. /package/dist/{lazy-value.d.ts → lazy-value/index.d.ts} +0 -0
  196. /package/dist/{merge-headers.d.ts → merge-headers/index.d.ts} +0 -0
  197. /package/dist/{noop.d.ts → noop/index.d.ts} +0 -0
  198. /package/dist/{once.d.ts → once/index.d.ts} +0 -0
  199. /package/dist/{pick-random.d.ts → pick-random/index.d.ts} +0 -0
  200. /package/dist/{random-int.d.ts → random-int/index.d.ts} +0 -0
  201. /package/dist/{repool.d.ts → repool/index.d.ts} +0 -0
  202. /package/dist/{shuffle-array.d.ts → shuffle-array/index.d.ts} +0 -0
  203. /package/dist/{simple-string-hash.d.ts → simple-string-hash/index.d.ts} +0 -0
  204. /package/dist/{string-join.d.ts → string-join/index.d.ts} +0 -0
  205. /package/dist/{tagged.d.ts → tagged/index.d.ts} +0 -0
  206. /package/dist/{text-line-stream.d.ts → text-line-stream/index.d.ts} +0 -0
  207. /package/dist/{wait.d.ts → wait/index.d.ts} +0 -0
@@ -1,60 +0,0 @@
1
- interface MemoizeStorageProvider {
2
- has(key: string): boolean | Promise<boolean>;
3
- get(key: string): string | undefined | PromiseLike<string | undefined>;
4
- set(key: string, value: string, ttl: number): void | Promise<void>;
5
- updateTtl?: (key: string, ttl: number) => void | Promise<void>;
6
- delete(key: string): void | Promise<void>;
7
- }
8
- interface CreateMemoizeOptions {
9
- /**
10
- * When set to true, the memoize will always try run the function first.
11
- * If promise resolved, it will update the cache.
12
- * If promise rejected, it will try to get the value from cache, and return
13
- * the cached value. If the cache is not available, it will throw the error.
14
- */
15
- onlyUseCachedIfFail?: boolean;
16
- resetTtlOnHit?: boolean;
17
- defaultTtl?: number;
18
- onCacheUpdate?: (key: string, { humanReadableName }: {
19
- humanReadableName: string;
20
- isUseCachedIfFail: boolean;
21
- }) => void;
22
- onCacheMiss?: (key: string, { humanReadableName }: {
23
- humanReadableName: string;
24
- isUseCachedIfFail: boolean;
25
- }) => void;
26
- onCacheHit?: (key: string, { humanReadableName }: {
27
- humanReadableName: string;
28
- isUseCachedIfFail: boolean;
29
- }) => void;
30
- /** recommendation: import('hash-wasm').xxhash64 */
31
- keyHasher?: (key: string) => Promise<string> | string;
32
- /** recommendation: import('devalue').stringify */
33
- argHasher: (args: any[]) => Promise<string> | string;
34
- }
35
- type SerializableValue = number | string | boolean | bigint | Date | RegExp | Set<SerializableValue> | SerializableValue[] | null | undefined | Map<SerializableValue, SerializableValue> | SerializableObject | /** TypedArray */ Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array | ArrayBuffer;
36
- interface SerializableObject {
37
- [key: string]: SerializableValue;
38
- }
39
- interface MemoizeBaseOptions {
40
- /**
41
- * The time to live of the cache in milliseconds.
42
- */
43
- ttl?: number | null;
44
- temporaryBypass?: boolean;
45
- }
46
- interface MemoizeOptionsWithCustomSerializer<T> extends MemoizeBaseOptions {
47
- serializer: (value: T) => string;
48
- deserializer: (cached: string) => T;
49
- }
50
- type MemoizeOptions<T> = T extends string ? MemoizeBaseOptions : MemoizeOptionsWithCustomSerializer<T>;
51
- /**
52
- * A factory function that returns a memoize function.
53
- *
54
- * Unlike common memoize function out there, this serialize the parameters and returned value
55
- * for easy storing with file system, SQLite, Redis, etc.
56
- */
57
- declare function createMemoize(storage: MemoizeStorageProvider, { onlyUseCachedIfFail, resetTtlOnHit, defaultTtl, onCacheUpdate, onCacheMiss, onCacheHit, keyHasher, argHasher }: CreateMemoizeOptions): <Args extends SerializableValue[], R>(fn: (...args: Args) => R | Promise<R>, opt?: MemoizeOptions<R>) => (...args: Args) => Promise<R>;
58
-
59
- export { createMemoize };
60
- export type { CreateMemoizeOptions, MemoizeOptions, MemoizeStorageProvider, SerializableValue };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./fast-string-array-join.js"),a=require("./identity.js"),t=require("./noop.js");exports.createMemoize=function(i,{onlyUseCachedIfFail:n=!1,resetTtlOnHit:r=!1,defaultTtl:l=6048e5,onCacheUpdate:s=t.noop,onCacheMiss:o=t.noop,onCacheHit:u=t.noop,keyHasher:d=a.identity,argHasher:f}){return function(t,h){if(h?.temporaryBypass)return(...e)=>Promise.resolve(t(...e));let m=h&&"serializer"in h?h.serializer:a.identity,c=h&&"deserializer"in h?h.deserializer:a.identity,p=h?.ttl??l,y=t.toString(),w=d(y);return async function(...a){let l=e.fastStringArrayJoin(await Promise.all([w,f(a)]),"|"),d=t.name||y||l,h=i.get(l);if(h&&"object"==typeof h&&"then"in h&&(h=await h),n)try{let e=await t(...a);s(l,{humanReadableName:d,isUseCachedIfFail:!0});let n=i.set(l,m(e),p);return n&&"then"in n&&await n,e}catch(e){if(null==h)throw o(l,{humanReadableName:d,isUseCachedIfFail:!0}),e;if(r){let e=i.updateTtl?.(l,p);e&&"then"in e&&await e}return u(l,{humanReadableName:d,isUseCachedIfFail:!0}),c(h)}if(null==h){o(l,{humanReadableName:d,isUseCachedIfFail:!1});let e=await t(...a),n=i.set(l,m(e),p);return n&&"then"in n&&await n,e}if(u(l,{humanReadableName:d,isUseCachedIfFail:!1}),r){let e=i.updateTtl?.(l,p);e&&"then"in e&&await e}return c(h)}}};
@@ -1 +0,0 @@
1
- import{fastStringArrayJoin as e}from"./fast-string-array-join.mjs";import{identity as a}from"./identity.mjs";import{noop as t}from"./noop.mjs";function i(i,{onlyUseCachedIfFail:r=!1,resetTtlOnHit:n=!1,defaultTtl:l=6048e5,onCacheUpdate:s=t,onCacheMiss:m=t,onCacheHit:o=t,keyHasher:f=a,argHasher:u}){return function(t,h){if(h?.temporaryBypass)return(...e)=>Promise.resolve(t(...e));let d=h&&"serializer"in h?h.serializer:a,c=h&&"deserializer"in h?h.deserializer:a,p=h?.ttl??l,w=t.toString(),y=f(w);return async function(...a){let l=e(await Promise.all([y,u(a)]),"|"),f=t.name||w||l,h=i.get(l);if(h&&"object"==typeof h&&"then"in h&&(h=await h),r)try{let e=await t(...a);s(l,{humanReadableName:f,isUseCachedIfFail:!0});let r=i.set(l,d(e),p);return r&&"then"in r&&await r,e}catch(e){if(null==h)throw m(l,{humanReadableName:f,isUseCachedIfFail:!0}),e;if(n){let e=i.updateTtl?.(l,p);e&&"then"in e&&await e}return o(l,{humanReadableName:f,isUseCachedIfFail:!0}),c(h)}if(null==h){m(l,{humanReadableName:f,isUseCachedIfFail:!1});let e=await t(...a),r=i.set(l,d(e),p);return r&&"then"in r&&await r,e}if(o(l,{humanReadableName:f,isUseCachedIfFail:!1}),n){let e=i.updateTtl?.(l,p);e&&"then"in e&&await e}return c(h)}}}export{i as createMemoize};
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.shuffleArray=function(e,r={}){let t,{copy:o=!1,random:l=Math.random}=r,n=o?e.slice():e,f=0,s=n.length;for(;s;)f=l()*s--|0,t=n[s],n[s]=n[f],n[f]=t;return n};
@@ -1 +0,0 @@
1
- function r(e,t={}){let n,{copy:f=!1,random:l=Math.random}=t,o=f?e.slice():e,a=0,h=o.length;for(;h;)a=l()*h--|0,n=o[h],o[h]=o[a],o[a]=n;return o}export{r as shuffleArray};
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./fnv1a52.js");exports.simpleStringHash=function(r){return e.fnv1a52(r).toString(36)+r.length.toString(36)};
@@ -1 +0,0 @@
1
- import{fnv1a52 as t}from"./fnv1a52.mjs";function n(n){return t(n).toString(36)+n.length.toString(36)}export{n as simpleStringHash};
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringJoin=function(e,r=",",t=!1){let n,o=e.length;if(0===o)return"";t&&(e=Array.from(new Set(e)));let l="",f=!1;for(let t=0;t<o;t++)(n=e[t])&&(f?l+=r:f=!0,l+=n);return l};
@@ -1 +0,0 @@
1
- function r(t,e=",",n=!1){let o,f=t.length;if(0===f)return"";n&&(t=Array.from(new Set(t)));let i="",l=!1;for(let r=0;r<f;r++)(o=t[r])&&(l?i+=e:l=!0,i+=o);return i}export{r as stringJoin};
package/dist/tagged.js DELETED
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.tagged=function(e,...r){return e.reduce((e,t,o)=>e+t+(r[o]??""),"")};
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./noop.js");class n extends TransformStream{constructor({allowCR:n=!1,skipEmptyLines:t=!1}={}){let r="",l=0,s=n?(e,n,r)=>{let s=e.indexOf("\r",l);if(-1!==s&&s!==e.length-1&&(-1===n||n-1>s)){let n=e.slice(l,s);return t&&0===n.length||r.enqueue(e.slice(l,s)),l=s+1,!0}return!1}:e.falseFn;super({transform(e,n){for(e=r+e,l=0;;){let r=e.indexOf("\n",l);if(s(e,r,n))continue;if(-1===r)break;let u=r;"\r"===e[r-1]&&u--;let i=e.slice(l,u);if(t&&0===i.length){l=r+1;continue}n.enqueue(i),l=r+1}r=e.slice(l)},flush(e){r.length>0&&(n&&"\r"===r[r.length-1]?e.enqueue(r.slice(0,-1)):e.enqueue(r))}})}}exports.TextLineStream=n;
@@ -1 +0,0 @@
1
- import{falseFn as e}from"./noop.mjs";class n extends TransformStream{constructor({allowCR:n=!1,skipEmptyLines:t=!1}={}){let r="",l=0,i=n?(e,n,r)=>{let i=e.indexOf("\r",l);if(-1!==i&&i!==e.length-1&&(-1===n||n-1>i)){let n=e.slice(l,i);return t&&0===n.length||r.enqueue(e.slice(l,i)),l=i+1,!0}return!1}:e;super({transform(e,n){for(e=r+e,l=0;;){let r=e.indexOf("\n",l);if(i(e,r,n))continue;if(-1===r)break;let u=r;"\r"===e[r-1]&&u--;let s=e.slice(l,u);if(t&&0===s.length){l=r+1;continue}n.enqueue(s),l=r+1}r=e.slice(l)},flush(e){r.length>0&&(n&&"\r"===r[r.length-1]?e.enqueue(r.slice(0,-1)):e.enqueue(r))}})}}export{n as TextLineStream};
package/dist/wait.js DELETED
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.wait=function(e){return new Promise(t=>{setTimeout(t,e)})},exports.waitWithAbort=function(e,t){return new Promise((r,o)=>{if(t.aborted)return void o(t.reason);let n=setTimeout(()=>{t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(n),t.removeEventListener("abort",i),o(t.reason)}t.addEventListener("abort",i)})};
package/dist/wait.mjs DELETED
@@ -1 +0,0 @@
1
- function e(e){return new Promise(t=>{setTimeout(t,e)})}function t(e,t){return new Promise((r,n)=>{if(t.aborted)return void n(t.reason);let o=setTimeout(()=>{t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(o),t.removeEventListener("abort",i),n(t.reason)}t.addEventListener("abort",i)})}export{e as wait,t as waitWithAbort};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes