foxts 3.7.0 → 3.9.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 (138) hide show
  1. package/dist/shuffle-array.d.ts +8 -0
  2. package/dist/shuffle-array.js +1 -0
  3. package/dist/shuffle-array.mjs +1 -0
  4. package/dist/{cjs/string-join.d.ts → string-join.d.ts} +1 -1
  5. package/dist/string-join.js +1 -0
  6. package/dist/string-join.mjs +1 -0
  7. package/package.json +146 -272
  8. package/dist/cjs/string-join.js +0 -1
  9. package/dist/es/add-array-elements-to-set.d.mts +0 -3
  10. package/dist/es/ahocorasick.d.mts +0 -3
  11. package/dist/es/append-array-in-place.d.mts +0 -4
  12. package/dist/es/append-set-elements-to-array.d.mts +0 -3
  13. package/dist/es/async-write-to-stream.d.mts +0 -18
  14. package/dist/es/bitwise.d.mts +0 -30
  15. package/dist/es/compare-source.d.mts +0 -5
  16. package/dist/es/create-fixed-array.d.mts +0 -6
  17. package/dist/es/detect-eol.d.mts +0 -3
  18. package/dist/es/escape-html.d.mts +0 -1
  19. package/dist/es/escape-string-regexp.d.mts +0 -11
  20. package/dist/es/fast-ip-version.d.mts +0 -6
  21. package/dist/es/fast-string-array-join.d.mts +0 -6
  22. package/dist/es/fifo.d.mts +0 -18
  23. package/dist/es/fnv1a.d.mts +0 -3
  24. package/dist/es/fnv1a52.d.mts +0 -12
  25. package/dist/es/guard.d.mts +0 -20
  26. package/dist/es/headers-to-object.d.mts +0 -5
  27. package/dist/es/identity.d.mts +0 -3
  28. package/dist/es/is-probably-ip.d.mts +0 -8
  29. package/dist/es/merge-headers.d.mts +0 -15
  30. package/dist/es/noop.d.mts +0 -12
  31. package/dist/es/once.d.mts +0 -3
  32. package/dist/es/pick-random.d.mts +0 -9
  33. package/dist/es/random-int.d.mts +0 -7
  34. package/dist/es/repool.d.mts +0 -19
  35. package/dist/es/retrie.d.mts +0 -17
  36. package/dist/es/serialized-memo.d.mts +0 -60
  37. package/dist/es/simple-string-hash.d.mts +0 -3
  38. package/dist/es/string-join.d.mts +0 -3
  39. package/dist/es/string-join.mjs +0 -1
  40. package/dist/es/tagged.d.mts +0 -6
  41. package/dist/es/text-line-stream.d.mts +0 -20
  42. package/dist/es/wait.d.mts +0 -4
  43. /package/dist/{cjs/add-array-elements-to-set.d.ts → add-array-elements-to-set.d.ts} +0 -0
  44. /package/dist/{cjs/add-array-elements-to-set.js → add-array-elements-to-set.js} +0 -0
  45. /package/dist/{es/add-array-elements-to-set.mjs → add-array-elements-to-set.mjs} +0 -0
  46. /package/dist/{cjs/ahocorasick.d.ts → ahocorasick.d.ts} +0 -0
  47. /package/dist/{cjs/ahocorasick.js → ahocorasick.js} +0 -0
  48. /package/dist/{es/ahocorasick.mjs → ahocorasick.mjs} +0 -0
  49. /package/dist/{cjs/append-array-in-place.d.ts → append-array-in-place.d.ts} +0 -0
  50. /package/dist/{cjs/append-array-in-place.js → append-array-in-place.js} +0 -0
  51. /package/dist/{es/append-array-in-place.mjs → append-array-in-place.mjs} +0 -0
  52. /package/dist/{cjs/append-set-elements-to-array.d.ts → append-set-elements-to-array.d.ts} +0 -0
  53. /package/dist/{cjs/append-set-elements-to-array.js → append-set-elements-to-array.js} +0 -0
  54. /package/dist/{es/append-set-elements-to-array.mjs → append-set-elements-to-array.mjs} +0 -0
  55. /package/dist/{cjs/async-write-to-stream.d.ts → async-write-to-stream.d.ts} +0 -0
  56. /package/dist/{cjs/async-write-to-stream.js → async-write-to-stream.js} +0 -0
  57. /package/dist/{es/async-write-to-stream.mjs → async-write-to-stream.mjs} +0 -0
  58. /package/dist/{cjs/bitwise.d.ts → bitwise.d.ts} +0 -0
  59. /package/dist/{cjs/bitwise.js → bitwise.js} +0 -0
  60. /package/dist/{es/bitwise.mjs → bitwise.mjs} +0 -0
  61. /package/dist/{cjs/compare-source.d.ts → compare-source.d.ts} +0 -0
  62. /package/dist/{cjs/compare-source.js → compare-source.js} +0 -0
  63. /package/dist/{es/compare-source.mjs → compare-source.mjs} +0 -0
  64. /package/dist/{cjs/create-fixed-array.d.ts → create-fixed-array.d.ts} +0 -0
  65. /package/dist/{cjs/create-fixed-array.js → create-fixed-array.js} +0 -0
  66. /package/dist/{es/create-fixed-array.mjs → create-fixed-array.mjs} +0 -0
  67. /package/dist/{cjs/detect-eol.d.ts → detect-eol.d.ts} +0 -0
  68. /package/dist/{cjs/detect-eol.js → detect-eol.js} +0 -0
  69. /package/dist/{es/detect-eol.mjs → detect-eol.mjs} +0 -0
  70. /package/dist/{cjs/escape-html.d.ts → escape-html.d.ts} +0 -0
  71. /package/dist/{cjs/escape-html.js → escape-html.js} +0 -0
  72. /package/dist/{es/escape-html.mjs → escape-html.mjs} +0 -0
  73. /package/dist/{cjs/escape-string-regexp.d.ts → escape-string-regexp.d.ts} +0 -0
  74. /package/dist/{cjs/escape-string-regexp.js → escape-string-regexp.js} +0 -0
  75. /package/dist/{es/escape-string-regexp.mjs → escape-string-regexp.mjs} +0 -0
  76. /package/dist/{cjs/fast-ip-version.d.ts → fast-ip-version.d.ts} +0 -0
  77. /package/dist/{cjs/fast-ip-version.js → fast-ip-version.js} +0 -0
  78. /package/dist/{es/fast-ip-version.mjs → fast-ip-version.mjs} +0 -0
  79. /package/dist/{cjs/fast-string-array-join.d.ts → fast-string-array-join.d.ts} +0 -0
  80. /package/dist/{cjs/fast-string-array-join.js → fast-string-array-join.js} +0 -0
  81. /package/dist/{es/fast-string-array-join.mjs → fast-string-array-join.mjs} +0 -0
  82. /package/dist/{cjs/fifo.d.ts → fifo.d.ts} +0 -0
  83. /package/dist/{cjs/fifo.js → fifo.js} +0 -0
  84. /package/dist/{es/fifo.mjs → fifo.mjs} +0 -0
  85. /package/dist/{cjs/fnv1a.d.ts → fnv1a.d.ts} +0 -0
  86. /package/dist/{cjs/fnv1a.js → fnv1a.js} +0 -0
  87. /package/dist/{es/fnv1a.mjs → fnv1a.mjs} +0 -0
  88. /package/dist/{cjs/fnv1a52.d.ts → fnv1a52.d.ts} +0 -0
  89. /package/dist/{cjs/fnv1a52.js → fnv1a52.js} +0 -0
  90. /package/dist/{es/fnv1a52.mjs → fnv1a52.mjs} +0 -0
  91. /package/dist/{cjs/guard.d.ts → guard.d.ts} +0 -0
  92. /package/dist/{cjs/guard.js → guard.js} +0 -0
  93. /package/dist/{es/guard.mjs → guard.mjs} +0 -0
  94. /package/dist/{cjs/headers-to-object.d.ts → headers-to-object.d.ts} +0 -0
  95. /package/dist/{cjs/headers-to-object.js → headers-to-object.js} +0 -0
  96. /package/dist/{es/headers-to-object.mjs → headers-to-object.mjs} +0 -0
  97. /package/dist/{cjs/identity.d.ts → identity.d.ts} +0 -0
  98. /package/dist/{cjs/identity.js → identity.js} +0 -0
  99. /package/dist/{es/identity.mjs → identity.mjs} +0 -0
  100. /package/dist/{cjs/is-probably-ip.d.ts → is-probably-ip.d.ts} +0 -0
  101. /package/dist/{cjs/is-probably-ip.js → is-probably-ip.js} +0 -0
  102. /package/dist/{es/is-probably-ip.mjs → is-probably-ip.mjs} +0 -0
  103. /package/dist/{cjs/merge-headers.d.ts → merge-headers.d.ts} +0 -0
  104. /package/dist/{cjs/merge-headers.js → merge-headers.js} +0 -0
  105. /package/dist/{es/merge-headers.mjs → merge-headers.mjs} +0 -0
  106. /package/dist/{cjs/noop.d.ts → noop.d.ts} +0 -0
  107. /package/dist/{cjs/noop.js → noop.js} +0 -0
  108. /package/dist/{es/noop.mjs → noop.mjs} +0 -0
  109. /package/dist/{cjs/once.d.ts → once.d.ts} +0 -0
  110. /package/dist/{cjs/once.js → once.js} +0 -0
  111. /package/dist/{es/once.mjs → once.mjs} +0 -0
  112. /package/dist/{cjs/pick-random.d.ts → pick-random.d.ts} +0 -0
  113. /package/dist/{cjs/pick-random.js → pick-random.js} +0 -0
  114. /package/dist/{es/pick-random.mjs → pick-random.mjs} +0 -0
  115. /package/dist/{cjs/random-int.d.ts → random-int.d.ts} +0 -0
  116. /package/dist/{cjs/random-int.js → random-int.js} +0 -0
  117. /package/dist/{es/random-int.mjs → random-int.mjs} +0 -0
  118. /package/dist/{cjs/repool.d.ts → repool.d.ts} +0 -0
  119. /package/dist/{cjs/repool.js → repool.js} +0 -0
  120. /package/dist/{es/repool.mjs → repool.mjs} +0 -0
  121. /package/dist/{cjs/retrie.d.ts → retrie.d.ts} +0 -0
  122. /package/dist/{cjs/retrie.js → retrie.js} +0 -0
  123. /package/dist/{es/retrie.mjs → retrie.mjs} +0 -0
  124. /package/dist/{cjs/serialized-memo.d.ts → serialized-memo.d.ts} +0 -0
  125. /package/dist/{cjs/serialized-memo.js → serialized-memo.js} +0 -0
  126. /package/dist/{es/serialized-memo.mjs → serialized-memo.mjs} +0 -0
  127. /package/dist/{cjs/simple-string-hash.d.ts → simple-string-hash.d.ts} +0 -0
  128. /package/dist/{cjs/simple-string-hash.js → simple-string-hash.js} +0 -0
  129. /package/dist/{es/simple-string-hash.mjs → simple-string-hash.mjs} +0 -0
  130. /package/dist/{cjs/tagged.d.ts → tagged.d.ts} +0 -0
  131. /package/dist/{cjs/tagged.js → tagged.js} +0 -0
  132. /package/dist/{es/tagged.mjs → tagged.mjs} +0 -0
  133. /package/dist/{cjs/text-line-stream.d.ts → text-line-stream.d.ts} +0 -0
  134. /package/dist/{cjs/text-line-stream.js → text-line-stream.js} +0 -0
  135. /package/dist/{es/text-line-stream.mjs → text-line-stream.mjs} +0 -0
  136. /package/dist/{cjs/wait.d.ts → wait.d.ts} +0 -0
  137. /package/dist/{cjs/wait.js → wait.js} +0 -0
  138. /package/dist/{es/wait.mjs → wait.mjs} +0 -0
@@ -1,6 +0,0 @@
1
- declare function createFixedArrayWithoutGC(length: number): readonly number[];
2
- declare function createFixedArrayWithGC(length: number): readonly number[];
3
- declare const createFixedArray: typeof createFixedArrayWithGC;
4
- declare const EMPTY_ARRAY: readonly number[];
5
-
6
- export { EMPTY_ARRAY, createFixedArray, createFixedArrayWithGC, createFixedArrayWithoutGC };
@@ -1,3 +0,0 @@
1
- declare function detectEol(str: string): "\n" | "\r\n";
2
-
3
- export { detectEol };
@@ -1 +0,0 @@
1
- export * from 'fast-escape-html';
@@ -1,11 +0,0 @@
1
- /**
2
- * Escape characters with special meaning either inside or outside character sets.
3
- * Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
4
- *
5
- * When the `unicodeMode` is `true` (default), the `-` character is escaped as `\x2d` to ensure compatibility with Unicode patterns, PCRE, and MongoDB.
6
- *
7
- * You should disable this option if you are using JavaScript regular expressions without the `u` flag.
8
- */
9
- declare function escapeStringRegexp(str: string, unicodeMode?: boolean): string;
10
-
11
- export { escapeStringRegexp };
@@ -1,6 +0,0 @@
1
- /**
2
- * If you know the input is probably an IP, you can use this function to quickly determine the version of the IP
3
- */
4
- declare function fastIpVersion(probablyIp: string): 4 | 6 | 0;
5
-
6
- export { fastIpVersion };
@@ -1,6 +0,0 @@
1
- /**
2
- * A 200% faster join than the native `Array.prototype.join` for string arrays and string separator.
3
- */
4
- declare function fastStringArrayJoin(arr: string[], sep: string): string;
5
-
6
- export { fastStringArrayJoin };
@@ -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 };
@@ -1,3 +0,0 @@
1
- declare function fnv1a(s: string): number;
2
-
3
- export { fnv1a };
@@ -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 };
@@ -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 };
@@ -1,5 +0,0 @@
1
- import { HeadersInitLike } from './merge-headers.mjs';
2
-
3
- declare function headersToObject(headers: HeadersInitLike | Headers): Record<string, string>;
4
-
5
- export { headersToObject };
@@ -1,3 +0,0 @@
1
- declare function identity<T = any, R = T>(item: T): R;
2
-
3
- export { identity };
@@ -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 };
@@ -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 };
@@ -1,3 +0,0 @@
1
- declare function once<T>(fn: (() => T), prewarm?: boolean): (() => T);
2
-
3
- export { once };
@@ -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 };
@@ -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 };
@@ -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 };
@@ -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 };
@@ -1,3 +0,0 @@
1
- declare function simpleStringHash(payload: string): string;
2
-
3
- export { simpleStringHash };
@@ -1,3 +0,0 @@
1
- declare function stringJoin(arr: Array<string | null | undefined>, sep?: string, dedupe?: boolean): string;
2
-
3
- export { stringJoin };
@@ -1 +0,0 @@
1
- import{fastStringArrayJoin as r}from"./fast-string-array-join.mjs";import{isNonNullish as t}from"./guard.mjs";function o(i,n=",",m=!1){return m&&(i=Array.from(new Set(i))),r(i.filter(t),n)}export{o as stringJoin};
@@ -1,6 +0,0 @@
1
- /**
2
- * @example import { tagged as html } from 'foxts/tagged';
3
- */
4
- declare function tagged(string: TemplateStringsArray, ...values: any[]): string;
5
-
6
- export { tagged };
@@ -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 };
@@ -1,4 +0,0 @@
1
- declare function wait(ms: number): Promise<void>;
2
- declare function waitWithAbort(ms: number, signal: AbortSignal): Promise<void>;
3
-
4
- export { wait, 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
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