foxts 3.8.0 → 3.9.0
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/shuffle-array.d.ts +8 -0
- package/dist/shuffle-array.js +1 -0
- package/dist/shuffle-array.mjs +1 -0
- package/package.json +139 -265
- package/dist/es/add-array-elements-to-set.d.mts +0 -3
- package/dist/es/ahocorasick.d.mts +0 -3
- package/dist/es/append-array-in-place.d.mts +0 -4
- package/dist/es/append-set-elements-to-array.d.mts +0 -3
- package/dist/es/async-write-to-stream.d.mts +0 -18
- package/dist/es/bitwise.d.mts +0 -30
- package/dist/es/compare-source.d.mts +0 -5
- package/dist/es/create-fixed-array.d.mts +0 -6
- package/dist/es/detect-eol.d.mts +0 -3
- package/dist/es/escape-html.d.mts +0 -1
- package/dist/es/escape-string-regexp.d.mts +0 -11
- package/dist/es/fast-ip-version.d.mts +0 -6
- package/dist/es/fast-string-array-join.d.mts +0 -6
- package/dist/es/fifo.d.mts +0 -18
- package/dist/es/fnv1a.d.mts +0 -3
- package/dist/es/fnv1a52.d.mts +0 -12
- package/dist/es/guard.d.mts +0 -20
- package/dist/es/headers-to-object.d.mts +0 -5
- package/dist/es/identity.d.mts +0 -3
- package/dist/es/is-probably-ip.d.mts +0 -8
- package/dist/es/merge-headers.d.mts +0 -15
- package/dist/es/noop.d.mts +0 -12
- package/dist/es/once.d.mts +0 -3
- package/dist/es/pick-random.d.mts +0 -9
- package/dist/es/random-int.d.mts +0 -7
- package/dist/es/repool.d.mts +0 -19
- package/dist/es/retrie.d.mts +0 -17
- package/dist/es/serialized-memo.d.mts +0 -60
- package/dist/es/simple-string-hash.d.mts +0 -3
- package/dist/es/string-join.d.mts +0 -3
- package/dist/es/tagged.d.mts +0 -6
- package/dist/es/text-line-stream.d.mts +0 -20
- package/dist/es/wait.d.mts +0 -4
- /package/dist/{cjs/add-array-elements-to-set.d.ts → add-array-elements-to-set.d.ts} +0 -0
- /package/dist/{cjs/add-array-elements-to-set.js → add-array-elements-to-set.js} +0 -0
- /package/dist/{es/add-array-elements-to-set.mjs → add-array-elements-to-set.mjs} +0 -0
- /package/dist/{cjs/ahocorasick.d.ts → ahocorasick.d.ts} +0 -0
- /package/dist/{cjs/ahocorasick.js → ahocorasick.js} +0 -0
- /package/dist/{es/ahocorasick.mjs → ahocorasick.mjs} +0 -0
- /package/dist/{cjs/append-array-in-place.d.ts → append-array-in-place.d.ts} +0 -0
- /package/dist/{cjs/append-array-in-place.js → append-array-in-place.js} +0 -0
- /package/dist/{es/append-array-in-place.mjs → append-array-in-place.mjs} +0 -0
- /package/dist/{cjs/append-set-elements-to-array.d.ts → append-set-elements-to-array.d.ts} +0 -0
- /package/dist/{cjs/append-set-elements-to-array.js → append-set-elements-to-array.js} +0 -0
- /package/dist/{es/append-set-elements-to-array.mjs → append-set-elements-to-array.mjs} +0 -0
- /package/dist/{cjs/async-write-to-stream.d.ts → async-write-to-stream.d.ts} +0 -0
- /package/dist/{cjs/async-write-to-stream.js → async-write-to-stream.js} +0 -0
- /package/dist/{es/async-write-to-stream.mjs → async-write-to-stream.mjs} +0 -0
- /package/dist/{cjs/bitwise.d.ts → bitwise.d.ts} +0 -0
- /package/dist/{cjs/bitwise.js → bitwise.js} +0 -0
- /package/dist/{es/bitwise.mjs → bitwise.mjs} +0 -0
- /package/dist/{cjs/compare-source.d.ts → compare-source.d.ts} +0 -0
- /package/dist/{cjs/compare-source.js → compare-source.js} +0 -0
- /package/dist/{es/compare-source.mjs → compare-source.mjs} +0 -0
- /package/dist/{cjs/create-fixed-array.d.ts → create-fixed-array.d.ts} +0 -0
- /package/dist/{cjs/create-fixed-array.js → create-fixed-array.js} +0 -0
- /package/dist/{es/create-fixed-array.mjs → create-fixed-array.mjs} +0 -0
- /package/dist/{cjs/detect-eol.d.ts → detect-eol.d.ts} +0 -0
- /package/dist/{cjs/detect-eol.js → detect-eol.js} +0 -0
- /package/dist/{es/detect-eol.mjs → detect-eol.mjs} +0 -0
- /package/dist/{cjs/escape-html.d.ts → escape-html.d.ts} +0 -0
- /package/dist/{cjs/escape-html.js → escape-html.js} +0 -0
- /package/dist/{es/escape-html.mjs → escape-html.mjs} +0 -0
- /package/dist/{cjs/escape-string-regexp.d.ts → escape-string-regexp.d.ts} +0 -0
- /package/dist/{cjs/escape-string-regexp.js → escape-string-regexp.js} +0 -0
- /package/dist/{es/escape-string-regexp.mjs → escape-string-regexp.mjs} +0 -0
- /package/dist/{cjs/fast-ip-version.d.ts → fast-ip-version.d.ts} +0 -0
- /package/dist/{cjs/fast-ip-version.js → fast-ip-version.js} +0 -0
- /package/dist/{es/fast-ip-version.mjs → fast-ip-version.mjs} +0 -0
- /package/dist/{cjs/fast-string-array-join.d.ts → fast-string-array-join.d.ts} +0 -0
- /package/dist/{cjs/fast-string-array-join.js → fast-string-array-join.js} +0 -0
- /package/dist/{es/fast-string-array-join.mjs → fast-string-array-join.mjs} +0 -0
- /package/dist/{cjs/fifo.d.ts → fifo.d.ts} +0 -0
- /package/dist/{cjs/fifo.js → fifo.js} +0 -0
- /package/dist/{es/fifo.mjs → fifo.mjs} +0 -0
- /package/dist/{cjs/fnv1a.d.ts → fnv1a.d.ts} +0 -0
- /package/dist/{cjs/fnv1a.js → fnv1a.js} +0 -0
- /package/dist/{es/fnv1a.mjs → fnv1a.mjs} +0 -0
- /package/dist/{cjs/fnv1a52.d.ts → fnv1a52.d.ts} +0 -0
- /package/dist/{cjs/fnv1a52.js → fnv1a52.js} +0 -0
- /package/dist/{es/fnv1a52.mjs → fnv1a52.mjs} +0 -0
- /package/dist/{cjs/guard.d.ts → guard.d.ts} +0 -0
- /package/dist/{cjs/guard.js → guard.js} +0 -0
- /package/dist/{es/guard.mjs → guard.mjs} +0 -0
- /package/dist/{cjs/headers-to-object.d.ts → headers-to-object.d.ts} +0 -0
- /package/dist/{cjs/headers-to-object.js → headers-to-object.js} +0 -0
- /package/dist/{es/headers-to-object.mjs → headers-to-object.mjs} +0 -0
- /package/dist/{cjs/identity.d.ts → identity.d.ts} +0 -0
- /package/dist/{cjs/identity.js → identity.js} +0 -0
- /package/dist/{es/identity.mjs → identity.mjs} +0 -0
- /package/dist/{cjs/is-probably-ip.d.ts → is-probably-ip.d.ts} +0 -0
- /package/dist/{cjs/is-probably-ip.js → is-probably-ip.js} +0 -0
- /package/dist/{es/is-probably-ip.mjs → is-probably-ip.mjs} +0 -0
- /package/dist/{cjs/merge-headers.d.ts → merge-headers.d.ts} +0 -0
- /package/dist/{cjs/merge-headers.js → merge-headers.js} +0 -0
- /package/dist/{es/merge-headers.mjs → merge-headers.mjs} +0 -0
- /package/dist/{cjs/noop.d.ts → noop.d.ts} +0 -0
- /package/dist/{cjs/noop.js → noop.js} +0 -0
- /package/dist/{es/noop.mjs → noop.mjs} +0 -0
- /package/dist/{cjs/once.d.ts → once.d.ts} +0 -0
- /package/dist/{cjs/once.js → once.js} +0 -0
- /package/dist/{es/once.mjs → once.mjs} +0 -0
- /package/dist/{cjs/pick-random.d.ts → pick-random.d.ts} +0 -0
- /package/dist/{cjs/pick-random.js → pick-random.js} +0 -0
- /package/dist/{es/pick-random.mjs → pick-random.mjs} +0 -0
- /package/dist/{cjs/random-int.d.ts → random-int.d.ts} +0 -0
- /package/dist/{cjs/random-int.js → random-int.js} +0 -0
- /package/dist/{es/random-int.mjs → random-int.mjs} +0 -0
- /package/dist/{cjs/repool.d.ts → repool.d.ts} +0 -0
- /package/dist/{cjs/repool.js → repool.js} +0 -0
- /package/dist/{es/repool.mjs → repool.mjs} +0 -0
- /package/dist/{cjs/retrie.d.ts → retrie.d.ts} +0 -0
- /package/dist/{cjs/retrie.js → retrie.js} +0 -0
- /package/dist/{es/retrie.mjs → retrie.mjs} +0 -0
- /package/dist/{cjs/serialized-memo.d.ts → serialized-memo.d.ts} +0 -0
- /package/dist/{cjs/serialized-memo.js → serialized-memo.js} +0 -0
- /package/dist/{es/serialized-memo.mjs → serialized-memo.mjs} +0 -0
- /package/dist/{cjs/simple-string-hash.d.ts → simple-string-hash.d.ts} +0 -0
- /package/dist/{cjs/simple-string-hash.js → simple-string-hash.js} +0 -0
- /package/dist/{es/simple-string-hash.mjs → simple-string-hash.mjs} +0 -0
- /package/dist/{cjs/string-join.d.ts → string-join.d.ts} +0 -0
- /package/dist/{cjs/string-join.js → string-join.js} +0 -0
- /package/dist/{es/string-join.mjs → string-join.mjs} +0 -0
- /package/dist/{cjs/tagged.d.ts → tagged.d.ts} +0 -0
- /package/dist/{cjs/tagged.js → tagged.js} +0 -0
- /package/dist/{es/tagged.mjs → tagged.mjs} +0 -0
- /package/dist/{cjs/text-line-stream.d.ts → text-line-stream.d.ts} +0 -0
- /package/dist/{cjs/text-line-stream.js → text-line-stream.js} +0 -0
- /package/dist/{es/text-line-stream.mjs → text-line-stream.mjs} +0 -0
- /package/dist/{cjs/wait.d.ts → wait.d.ts} +0 -0
- /package/dist/{cjs/wait.js → wait.js} +0 -0
- /package/dist/{es/wait.mjs → wait.mjs} +0 -0
package/dist/es/fifo.d.mts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** Checkout https://npm.im/fast-fifo if performance is critical */
|
|
2
|
-
declare class FIFO<T> {
|
|
3
|
-
private head;
|
|
4
|
-
private tail;
|
|
5
|
-
$size: number;
|
|
6
|
-
constructor();
|
|
7
|
-
enqueue(value: T): void;
|
|
8
|
-
push: (value: T) => void;
|
|
9
|
-
dequeue(): T | undefined;
|
|
10
|
-
shift: () => T | undefined;
|
|
11
|
-
peek(): T | undefined;
|
|
12
|
-
clear(): void;
|
|
13
|
-
get size(): number;
|
|
14
|
-
get length(): number;
|
|
15
|
-
[Symbol.iterator](): Generator<T, void, unknown>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { FIFO };
|
package/dist/es/fnv1a.d.mts
DELETED
package/dist/es/fnv1a52.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FNV-1a Hash implementation
|
|
3
|
-
* @author Travis Webb (tjwebb) <me@traviswebb.com>
|
|
4
|
-
*
|
|
5
|
-
* Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js
|
|
6
|
-
*
|
|
7
|
-
* Simplified, optimized and add modified for 52 bit, which provides a larger hash space
|
|
8
|
-
* and still making use of Javascript's 53-bit integer space.
|
|
9
|
-
*/
|
|
10
|
-
declare function fnv1a52(str: string): number;
|
|
11
|
-
|
|
12
|
-
export { fnv1a52 };
|
package/dist/es/guard.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare function not(arg: null): <T>(i: T | null) => i is T;
|
|
2
|
-
declare function not(arg: undefined): <T>(i: T | undefined) => i is T;
|
|
3
|
-
declare function not(arg: false): <T>(i: T | false) => i is T;
|
|
4
|
-
declare function not(arg: 'nullish'): <T>(i: T | null | undefined) => i is T;
|
|
5
|
-
declare function not(arg: 'falsy'): <T>(i: T | 0 | '' | false | null | undefined) => i is T;
|
|
6
|
-
declare function is(arg: null): (i: unknown) => i is null;
|
|
7
|
-
declare function is(arg: undefined): (i: unknown) => i is undefined;
|
|
8
|
-
declare function is(arg: false): (i: unknown) => i is false;
|
|
9
|
-
declare function is(arg: 'nullish'): (i: unknown) => i is null | undefined;
|
|
10
|
-
declare function is(arg: 'falsy'): (i: unknown) => i is 0 | '' | false | null | undefined;
|
|
11
|
-
declare function is(arg: 'truthy'): <T>(i: T | 0 | '' | false | null | undefined) => i is T;
|
|
12
|
-
declare const isTruthy: <T>(i: T | 0 | "" | false | null | undefined) => i is T;
|
|
13
|
-
declare const isFalsy: (i: unknown) => i is 0 | "" | false | null | undefined;
|
|
14
|
-
declare const isNonNull: <T>(i: T | null) => i is T;
|
|
15
|
-
declare const isNonNullish: <T>(i: T | null | undefined) => i is T;
|
|
16
|
-
declare function nullthrow<T>(value: T | null | undefined, message?: string): T;
|
|
17
|
-
declare function invariant<T>(value: T | null | undefined, message?: string): asserts value is T;
|
|
18
|
-
declare function never(value: never, valueMetaName?: string): never;
|
|
19
|
-
|
|
20
|
-
export { invariant, is, isFalsy, isNonNull, isNonNullish, isTruthy, never, not, nullthrow };
|
package/dist/es/identity.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if a hostname is an IP. You should be aware that this only works
|
|
3
|
-
* because `hostname` is already garanteed to be a valid hostname!
|
|
4
|
-
*/
|
|
5
|
-
declare function isProbablyIpv4(hostname: string): boolean;
|
|
6
|
-
declare function isProbablyIpv6(hostname: string): boolean;
|
|
7
|
-
|
|
8
|
-
export { isProbablyIpv4, isProbablyIpv6 };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type HeadersInitLike = string[][] | Record<string, string | readonly string[]> | Headers | null | undefined;
|
|
2
|
-
type IncomingHttpHeadersLike = Record<string, string | string[] | undefined> | undefined | null;
|
|
3
|
-
type OutgoingHttpHeadersLike = Record<string, number | string | string[] | undefined> | undefined | null;
|
|
4
|
-
declare function mergeHeaders(dest: HeadersInitLike, source: HeadersInitLike,
|
|
5
|
-
/**
|
|
6
|
-
* Filter function to determine which headers from source to merge.
|
|
7
|
-
*
|
|
8
|
-
* Can be an array/iterable of header names to include, or a filter callback that takes a header name.
|
|
9
|
-
*/
|
|
10
|
-
sourceFilter?: Iterable<string> | null | undefined | ((headerName: string) => boolean)): Headers;
|
|
11
|
-
declare function mergeNodeHttpHeaders(dest: IncomingHttpHeadersLike, source: IncomingHttpHeadersLike): IncomingHttpHeadersLike;
|
|
12
|
-
declare function mergeNodeHttpHeaders(dest: OutgoingHttpHeadersLike, source: IncomingHttpHeadersLike | OutgoingHttpHeadersLike): OutgoingHttpHeadersLike;
|
|
13
|
-
|
|
14
|
-
export { mergeHeaders, mergeNodeHttpHeaders };
|
|
15
|
-
export type { HeadersInitLike, IncomingHttpHeadersLike, OutgoingHttpHeadersLike };
|
package/dist/es/noop.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface Noop<T = any> {
|
|
2
|
-
(...args: any[]): T;
|
|
3
|
-
}
|
|
4
|
-
declare const noop: Noop;
|
|
5
|
-
declare const trueFn: Noop<true>;
|
|
6
|
-
declare const falseFn: Noop<false>;
|
|
7
|
-
declare const throwFn: Noop<never>;
|
|
8
|
-
declare const asyncNoop: Noop<Promise<any>>;
|
|
9
|
-
declare const asyncNeverFn: Noop<Promise<never>>;
|
|
10
|
-
|
|
11
|
-
export { asyncNeverFn, asyncNoop, falseFn, noop, throwFn, trueFn };
|
|
12
|
-
export type { Noop };
|
package/dist/es/once.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param randomInt - a random generate function that accepts two arguments `min` and `max` and returns a random number between `min` and `max`
|
|
3
|
-
*/
|
|
4
|
-
declare function createPickRandom(randomInt: (min: number, max: number) => number): <T>(data: T[] | readonly T[], count?: number) => T[];
|
|
5
|
-
declare const pickRandom: <T>(data: T[] | readonly T[], count?: number) => T[];
|
|
6
|
-
declare function createPickOne(randomInt: (min: number, max: number) => number): <T>(data: T[] | readonly T[]) => T;
|
|
7
|
-
declare const pickOne: <T>(data: T[] | readonly T[]) => T;
|
|
8
|
-
|
|
9
|
-
export { createPickOne, createPickRandom, pickOne, pickRandom };
|
package/dist/es/random-int.d.mts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param random - a random generate function that returns a number between 0 and 1
|
|
3
|
-
*/
|
|
4
|
-
declare function createRandomInt(random: () => number): (min: number, max: number) => number;
|
|
5
|
-
declare const randomInt: (min: number, max: number) => number;
|
|
6
|
-
|
|
7
|
-
export { createRandomInt, randomInt };
|
package/dist/es/repool.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface Reusifiable {
|
|
2
|
-
next: this | null;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Repool is a class that allows you to reuse objects.
|
|
6
|
-
*
|
|
7
|
-
* Do not use this to store class instances, please use https://github.com/mcollina/reusify instead.
|
|
8
|
-
*/
|
|
9
|
-
declare class Repool<T extends Reusifiable> {
|
|
10
|
-
private createObject;
|
|
11
|
-
private head;
|
|
12
|
-
private tail;
|
|
13
|
-
constructor(createObject: () => T);
|
|
14
|
-
get(): T;
|
|
15
|
-
release(obj: T): void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Repool };
|
|
19
|
-
export type { Reusifiable };
|
package/dist/es/retrie.d.mts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as ___noop from './noop.mjs';
|
|
2
|
-
|
|
3
|
-
interface BaseTrie {
|
|
4
|
-
[key: string]: Trie;
|
|
5
|
-
}
|
|
6
|
-
type Trie = BaseTrie | {
|
|
7
|
-
'': '';
|
|
8
|
-
};
|
|
9
|
-
declare function retrie(keywords: ArrayLike<string>, asPrefixes?: boolean): {
|
|
10
|
-
tree: BaseTrie;
|
|
11
|
-
add: (keywords: string, asPrefixes: boolean) => void;
|
|
12
|
-
toString: () => string;
|
|
13
|
-
toRe: () => RegExp;
|
|
14
|
-
};
|
|
15
|
-
declare function createRetrieKeywordFilter(keywords: ArrayLike<string>, asPrefixes?: boolean): ___noop.Noop<false> | ((string: string) => boolean);
|
|
16
|
-
|
|
17
|
-
export { createRetrieKeywordFilter, retrie };
|
|
@@ -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/es/tagged.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface TextLineStreamOptions {
|
|
2
|
-
/** Allow splitting by solo \r */
|
|
3
|
-
allowCR?: boolean;
|
|
4
|
-
skipEmptyLines?: boolean;
|
|
5
|
-
}
|
|
6
|
-
/** Transform a stream into a stream where each chunk is divided by a newline,
|
|
7
|
-
* be it `\n` or `\r\n`. `\r` can be enabled via the `allowCR` option.
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* const res = await fetch('https://example.com');
|
|
11
|
-
* const lines = res.body!
|
|
12
|
-
* .pipeThrough(new TextDecoderStream())
|
|
13
|
-
* .pipeThrough(new TextLineStream());
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
declare class TextLineStream extends TransformStream<string, string> {
|
|
17
|
-
constructor({ allowCR, skipEmptyLines }?: TextLineStreamOptions);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { TextLineStream };
|
package/dist/es/wait.d.mts
DELETED
|
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
|
|
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
|
|
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
|