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.
- package/dist/add-array-elements-to-set/index.js +1 -0
- package/dist/add-array-elements-to-set/index.mjs +1 -0
- package/dist/ahocorasick/index.js +1 -0
- package/dist/ahocorasick/index.mjs +1 -0
- package/dist/append-array-in-place/index.js +1 -0
- package/dist/append-array-in-place/index.mjs +1 -0
- package/dist/append-set-elements-to-array/index.js +1 -0
- package/dist/append-set-elements-to-array/index.mjs +1 -0
- package/dist/async-write-to-stream/index.js +1 -0
- package/dist/{async-write-to-stream.mjs → async-write-to-stream/index.mjs} +1 -1
- package/dist/{available-parallelism.d.ts → available-parallelism/index.d.ts} +1 -1
- package/dist/available-parallelism/index.js +1 -0
- package/dist/{available-parallelism.mjs → available-parallelism/index.mjs} +1 -1
- package/dist/bitwise/index.js +1 -0
- package/dist/bitwise/index.mjs +1 -0
- package/dist/chunk/index.js +1 -0
- package/dist/chunk/index.mjs +1 -0
- package/dist/compare-source/index.js +1 -0
- package/dist/compare-source/index.mjs +1 -0
- package/dist/create-fixed-array/index.js +1 -0
- package/dist/create-fixed-array/index.mjs +1 -0
- package/dist/define-lazy-property/index.js +1 -0
- package/dist/define-lazy-property/index.mjs +1 -0
- package/dist/detect-eol/index.js +1 -0
- package/dist/detect-eol/index.mjs +1 -0
- package/dist/empty-node/index.js +1 -0
- package/dist/empty-node/index.mjs +1 -0
- package/dist/{escape-html.d.ts → escape-html/index.d.ts} +1 -0
- package/dist/escape-html/index.js +1 -0
- package/dist/escape-html/index.mjs +1 -0
- package/dist/escape-string-regexp/index.js +1 -0
- package/dist/{escape-string-regexp.mjs → escape-string-regexp/index.mjs} +1 -1
- package/dist/extract-error-message/index.js +1 -0
- package/dist/{extract-error-message.mjs → extract-error-message/index.mjs} +1 -1
- package/dist/fast-ip-version/index.js +1 -0
- package/dist/{fast-ip-version.mjs → fast-ip-version/index.mjs} +1 -1
- package/dist/fast-string-array-join/index.js +1 -0
- package/dist/fast-string-array-join/index.mjs +1 -0
- package/dist/fast-string-compare/index.d.ts +12 -0
- package/dist/fast-string-compare/index.js +1 -0
- package/dist/fast-string-compare/index.mjs +1 -0
- package/dist/fifo/index.js +1 -0
- package/dist/fifo/index.mjs +1 -0
- package/dist/fnv1a/index.js +1 -0
- package/dist/{fnv1a.mjs → fnv1a/index.mjs} +1 -1
- package/dist/fnv1a52/index.js +1 -0
- package/dist/fnv1a52/index.mjs +1 -0
- package/dist/guard/index.js +1 -0
- package/dist/guard/index.mjs +1 -0
- package/dist/{headers-to-object.d.ts → headers-to-object/index.d.ts} +1 -1
- package/dist/headers-to-object/index.js +1 -0
- package/dist/headers-to-object/index.mjs +1 -0
- package/dist/identity/index.js +1 -0
- package/dist/identity/index.mjs +1 -0
- package/dist/is-function/index.js +1 -0
- package/dist/is-function/index.mjs +1 -0
- package/dist/is-probably-ip/index.js +1 -0
- package/dist/is-probably-ip/index.mjs +1 -0
- package/dist/lazy-promise/index.js +1 -0
- package/dist/lazy-promise/index.mjs +1 -0
- package/dist/lazy-value/index.js +1 -0
- package/dist/lazy-value/index.mjs +1 -0
- package/dist/merge-headers/index.js +1 -0
- package/dist/merge-headers/index.mjs +1 -0
- package/dist/noop/index.js +1 -0
- package/dist/noop/index.mjs +1 -0
- package/dist/once/index.js +1 -0
- package/dist/{once.mjs → once/index.mjs} +1 -1
- package/dist/pick-random/index.js +1 -0
- package/dist/pick-random/index.mjs +1 -0
- package/dist/random-int/index.js +1 -0
- package/dist/random-int/index.mjs +1 -0
- package/dist/repool/index.js +1 -0
- package/dist/repool/index.mjs +1 -0
- package/dist/{retrie.d.ts → retrie/index.d.ts} +2 -2
- package/dist/retrie/index.js +1 -0
- package/dist/retrie/index.mjs +1 -0
- package/dist/shuffle-array/index.js +1 -0
- package/dist/shuffle-array/index.mjs +1 -0
- package/dist/simple-string-hash/index.js +1 -0
- package/dist/simple-string-hash/index.mjs +1 -0
- package/dist/string-join/index.js +1 -0
- package/dist/string-join/index.mjs +1 -0
- package/dist/tagged/index.js +1 -0
- package/dist/{tagged.mjs → tagged/index.mjs} +1 -1
- package/dist/text-line-stream/index.js +1 -0
- package/dist/text-line-stream/index.mjs +1 -0
- package/dist/uint8array-utils/index.d.ts +6 -0
- package/dist/uint8array-utils/index.js +1 -0
- package/dist/uint8array-utils/index.mjs +1 -0
- package/dist/wait/index.js +1 -0
- package/dist/wait/index.mjs +1 -0
- package/package.json +106 -98
- package/dist/add-array-elements-to-set.js +0 -1
- package/dist/add-array-elements-to-set.mjs +0 -1
- package/dist/ahocorasick.js +0 -1
- package/dist/ahocorasick.mjs +0 -1
- package/dist/append-array-in-place.js +0 -1
- package/dist/append-array-in-place.mjs +0 -1
- package/dist/append-set-elements-to-array.js +0 -1
- package/dist/append-set-elements-to-array.mjs +0 -1
- package/dist/async-write-to-stream.js +0 -1
- package/dist/available-parallelism.js +0 -1
- package/dist/bitwise.js +0 -1
- package/dist/bitwise.mjs +0 -1
- package/dist/chunk.js +0 -1
- package/dist/chunk.mjs +0 -1
- package/dist/compare-source.js +0 -1
- package/dist/compare-source.mjs +0 -1
- package/dist/create-fixed-array.js +0 -1
- package/dist/create-fixed-array.mjs +0 -1
- package/dist/define-lazy-property.js +0 -1
- package/dist/define-lazy-property.mjs +0 -1
- package/dist/detect-eol.js +0 -1
- package/dist/detect-eol.mjs +0 -1
- package/dist/empty-node.js +0 -1
- package/dist/empty-node.mjs +0 -1
- package/dist/escape-html.js +0 -1
- package/dist/escape-html.mjs +0 -1
- package/dist/escape-string-regexp.js +0 -1
- package/dist/extract-error-message.js +0 -1
- package/dist/fast-ip-version.js +0 -1
- package/dist/fast-string-array-join.js +0 -1
- package/dist/fast-string-array-join.mjs +0 -1
- package/dist/fifo.js +0 -1
- package/dist/fifo.mjs +0 -1
- package/dist/fnv1a.js +0 -1
- package/dist/fnv1a52.js +0 -1
- package/dist/fnv1a52.mjs +0 -1
- package/dist/guard.js +0 -1
- package/dist/guard.mjs +0 -1
- package/dist/headers-to-object.js +0 -1
- package/dist/headers-to-object.mjs +0 -1
- package/dist/identity.js +0 -1
- package/dist/identity.mjs +0 -1
- package/dist/is-function.js +0 -1
- package/dist/is-function.mjs +0 -1
- package/dist/is-probably-ip.js +0 -1
- package/dist/is-probably-ip.mjs +0 -1
- package/dist/lazy-promise.js +0 -1
- package/dist/lazy-promise.mjs +0 -1
- package/dist/lazy-value.js +0 -1
- package/dist/lazy-value.mjs +0 -1
- package/dist/merge-headers.js +0 -1
- package/dist/merge-headers.mjs +0 -1
- package/dist/noop.js +0 -1
- package/dist/noop.mjs +0 -1
- package/dist/once.js +0 -1
- package/dist/pick-random.js +0 -1
- package/dist/pick-random.mjs +0 -1
- package/dist/random-int.js +0 -1
- package/dist/random-int.mjs +0 -1
- package/dist/repool.js +0 -1
- package/dist/repool.mjs +0 -1
- package/dist/retrie.js +0 -1
- package/dist/retrie.mjs +0 -1
- package/dist/serialized-memo.d.ts +0 -60
- package/dist/serialized-memo.js +0 -1
- package/dist/serialized-memo.mjs +0 -1
- package/dist/shuffle-array.js +0 -1
- package/dist/shuffle-array.mjs +0 -1
- package/dist/simple-string-hash.js +0 -1
- package/dist/simple-string-hash.mjs +0 -1
- package/dist/string-join.js +0 -1
- package/dist/string-join.mjs +0 -1
- package/dist/tagged.js +0 -1
- package/dist/text-line-stream.js +0 -1
- package/dist/text-line-stream.mjs +0 -1
- package/dist/wait.js +0 -1
- package/dist/wait.mjs +0 -1
- /package/dist/{add-array-elements-to-set.d.ts → add-array-elements-to-set/index.d.ts} +0 -0
- /package/dist/{ahocorasick.d.ts → ahocorasick/index.d.ts} +0 -0
- /package/dist/{append-array-in-place.d.ts → append-array-in-place/index.d.ts} +0 -0
- /package/dist/{append-set-elements-to-array.d.ts → append-set-elements-to-array/index.d.ts} +0 -0
- /package/dist/{async-write-to-stream.d.ts → async-write-to-stream/index.d.ts} +0 -0
- /package/dist/{bitwise.d.ts → bitwise/index.d.ts} +0 -0
- /package/dist/{chunk.d.ts → chunk/index.d.ts} +0 -0
- /package/dist/{compare-source.d.ts → compare-source/index.d.ts} +0 -0
- /package/dist/{create-fixed-array.d.ts → create-fixed-array/index.d.ts} +0 -0
- /package/dist/{define-lazy-property.d.ts → define-lazy-property/index.d.ts} +0 -0
- /package/dist/{detect-eol.d.ts → detect-eol/index.d.ts} +0 -0
- /package/dist/{empty-node.d.ts → empty-node/index.d.ts} +0 -0
- /package/dist/{escape-string-regexp.d.ts → escape-string-regexp/index.d.ts} +0 -0
- /package/dist/{extract-error-message.d.ts → extract-error-message/index.d.ts} +0 -0
- /package/dist/{fast-ip-version.d.ts → fast-ip-version/index.d.ts} +0 -0
- /package/dist/{fast-string-array-join.d.ts → fast-string-array-join/index.d.ts} +0 -0
- /package/dist/{fifo.d.ts → fifo/index.d.ts} +0 -0
- /package/dist/{fnv1a.d.ts → fnv1a/index.d.ts} +0 -0
- /package/dist/{fnv1a52.d.ts → fnv1a52/index.d.ts} +0 -0
- /package/dist/{guard.d.ts → guard/index.d.ts} +0 -0
- /package/dist/{identity.d.ts → identity/index.d.ts} +0 -0
- /package/dist/{is-function.d.ts → is-function/index.d.ts} +0 -0
- /package/dist/{is-probably-ip.d.ts → is-probably-ip/index.d.ts} +0 -0
- /package/dist/{lazy-promise.d.ts → lazy-promise/index.d.ts} +0 -0
- /package/dist/{lazy-value.d.ts → lazy-value/index.d.ts} +0 -0
- /package/dist/{merge-headers.d.ts → merge-headers/index.d.ts} +0 -0
- /package/dist/{noop.d.ts → noop/index.d.ts} +0 -0
- /package/dist/{once.d.ts → once/index.d.ts} +0 -0
- /package/dist/{pick-random.d.ts → pick-random/index.d.ts} +0 -0
- /package/dist/{random-int.d.ts → random-int/index.d.ts} +0 -0
- /package/dist/{repool.d.ts → repool/index.d.ts} +0 -0
- /package/dist/{shuffle-array.d.ts → shuffle-array/index.d.ts} +0 -0
- /package/dist/{simple-string-hash.d.ts → simple-string-hash/index.d.ts} +0 -0
- /package/dist/{string-join.d.ts → string-join/index.d.ts} +0 -0
- /package/dist/{tagged.d.ts → tagged/index.d.ts} +0 -0
- /package/dist/{text-line-stream.d.ts → text-line-stream/index.d.ts} +0 -0
- /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 };
|
package/dist/serialized-memo.js
DELETED
|
@@ -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)}}};
|
package/dist/serialized-memo.mjs
DELETED
|
@@ -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};
|
package/dist/shuffle-array.js
DELETED
|
@@ -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};
|
package/dist/shuffle-array.mjs
DELETED
|
@@ -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};
|
package/dist/string-join.js
DELETED
|
@@ -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};
|
package/dist/string-join.mjs
DELETED
|
@@ -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]??""),"")};
|
package/dist/text-line-stream.js
DELETED
|
@@ -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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|