foxts 0.0.0 → 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/LICENSE +21 -0
- package/README.md +24 -0
- package/append-set-elements-to-array/index.cjs +1 -0
- package/append-set-elements-to-array/index.d.ts +3 -0
- package/append-set-elements-to-array/index.mjs +1 -0
- package/async-write-to-stream/index.cjs +1 -0
- package/async-write-to-stream/index.d.ts +18 -0
- package/async-write-to-stream/index.mjs +1 -0
- package/bitwise/index.cjs +1 -0
- package/bitwise/index.d.ts +30 -0
- package/bitwise/index.mjs +1 -0
- package/fast-string-array-join/index.cjs +1 -0
- package/fast-string-array-join/index.d.ts +6 -0
- package/fast-string-array-join/index.mjs +1 -0
- package/fnv1a/index.cjs +1 -0
- package/fnv1a/index.d.ts +3 -0
- package/fnv1a/index.mjs +1 -0
- package/fnv1a52/index.cjs +1 -0
- package/fnv1a52/index.d.ts +12 -0
- package/fnv1a52/index.mjs +1 -0
- package/guard/index.cjs +1 -0
- package/guard/index.d.ts +17 -0
- package/guard/index.mjs +1 -0
- package/headers-to-object/index.cjs +1 -0
- package/headers-to-object/index.d.ts +5 -0
- package/headers-to-object/index.mjs +1 -0
- package/identity/index.cjs +1 -0
- package/identity/index.d.ts +3 -0
- package/identity/index.mjs +1 -0
- package/is-probably-ip/index.cjs +1 -0
- package/is-probably-ip/index.d.ts +8 -0
- package/is-probably-ip/index.mjs +1 -0
- package/merge-headers/index.cjs +1 -0
- package/merge-headers/index.d.ts +4 -0
- package/merge-headers/index.mjs +1 -0
- package/noop/index.cjs +1 -0
- package/noop/index.d.ts +3 -0
- package/noop/index.mjs +1 -0
- package/package.json +155 -11
- package/simple-string-hash/index.cjs +1 -0
- package/simple-string-hash/index.d.ts +3 -0
- package/simple-string-hash/index.mjs +1 -0
- package/ts_version_4.8_and_above_is_required.d.ts +0 -0
- package/wait/index.cjs +1 -0
- package/wait/index.d.ts +3 -0
- package/wait/index.mjs +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Sukka
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# foxts
|
|
2
|
+
|
|
3
|
+
Opinionated collection of common JavaScript / TypeScript utils by [@SukkaW](https://github.com/SukkaW).
|
|
4
|
+
|
|
5
|
+
- Dual Bundle
|
|
6
|
+
- Tree-shakable ESM/CJS
|
|
7
|
+
- Fully typed
|
|
8
|
+
|
|
9
|
+
## License
|
|
10
|
+
|
|
11
|
+
[MIT](./LICENSE)
|
|
12
|
+
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
**foxts** © [Sukka](https://github.com/SukkaW), Released under the [MIT](./LICENSE) License.
|
|
16
|
+
Authored and maintained by Sukka with help from contributors ([list](https://github.com/SukkaW/foxts/graphs/contributors)).
|
|
17
|
+
|
|
18
|
+
> [Personal Website](https://skk.moe) · [Blog](https://blog.skk.moe) · GitHub [@SukkaW](https://github.com/SukkaW) · Telegram Channel [@SukkaChannel](https://t.me/SukkaChannel) · Mastodon [@sukka@acg.mn](https://acg.mn/@sukka) · Twitter [@isukkaw](https://twitter.com/isukkaw) · Keybase [@sukka](https://keybase.io/sukka)
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://github.com/sponsors/SukkaW/">
|
|
22
|
+
<img src="https://sponsor.cdn.skk.moe/sponsors.svg"/>
|
|
23
|
+
</a>
|
|
24
|
+
</p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../identity/index.cjs");function r(e,r,t){let n;const i=r.values();for(;!(n=i.next()).done;)e.push(t(n.value));return e}exports.appendSetElementsToArray=function(t,n,i=e.identity){if(!Array.isArray(n))return r(t,n,i);for(let e=0,u=n.length;e<u;e++)r(t,n[e],i);return t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{identity as e}from"../identity/index.mjs";function r(e,r,t){let n;const o=r.values();for(;!(n=o.next()).done;)e.push(t(n.value));return e}function t(n,o,i=e){if(!Array.isArray(o))return r(n,o,i);for(let e=0,t=o.length;e<t;e++)r(n,o[e],i);return n}export{t as appendSetElementsToArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("node:events");exports.asyncWriteToStream=function(r,n){return r.write(n)?null:e.once(r,"drain")};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Writable } from 'node:stream';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A small utility function for writing chunk to a stream, and only return promise when needed (stream backpressure)
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* const writeStream = fs.createWriteStream(outputFile);
|
|
8
|
+
* for (const line of source) {
|
|
9
|
+
* const p = asyncWriteToStream(writeStream, line + '\n');
|
|
10
|
+
* if (p) {
|
|
11
|
+
* // eslint-disable-next-line no-await-in-loop -- stream backpressure
|
|
12
|
+
* await p;
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
declare function asyncWriteToStream<T>(stream: Writable, chunk: T): Promise<unknown> | null;
|
|
17
|
+
|
|
18
|
+
export { asyncWriteToStream };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{once as r}from"node:events";function e(e,n){return e.write(n)?null:r(e,"drain")}export{e as asyncWriteToStream};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=t=>t>>16&65535,e=t=>65535&t,r=t=>t>>20&1023,s=t=>t>>10&1023,o=t=>1023&t;exports.bitCount=function(t){return t-=t>>1&0x55555555,((t=(0x33333333&t)+(t>>2&0x33333333))+(t>>4)&0xf0f0f0f)*0x1010101>>24},exports.deleteBit=(t,e)=>t&~e,exports.getBit=(t,e)=>!!(t&e),exports.missingBit=(t,e)=>!(t&e),exports.packThreeBits=(t,e,r)=>t<<20|e<<10|r,exports.packTwoBits=(t,e)=>t<<16|e,exports.setBit=(t,e)=>t|e,exports.unpackThreeBits=function(t,e=Array.from([,,,].keys())){return e[0]=r(t),e[1]=s(t),e[2]=o(t),e},exports.unpackThreeBitsFirst=r,exports.unpackThreeBitsSecond=s,exports.unpackThreeBitsThird=o,exports.unpackTwoBits=function(r,s=Array.from([,,].keys())){return s[0]=t(r),s[1]=e(r),s},exports.unpackTwoBitsFirst=t,exports.unpackTwoBitsSecond=e;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare function bitCount(n: number): number;
|
|
2
|
+
declare const getBit: (n: number, mask: number) => boolean;
|
|
3
|
+
declare const missingBit: (n: number, mask: number) => boolean;
|
|
4
|
+
declare const setBit: (n: number, mask: number) => number;
|
|
5
|
+
declare const deleteBit: (n: number, mask: number) => number;
|
|
6
|
+
/** Packs two 16-bit integers (0~65535) into one 32-bit integer */
|
|
7
|
+
declare const packTwoBits: (a: number, b: number) => number;
|
|
8
|
+
declare const unpackTwoBitsFirst: (value: number) => number;
|
|
9
|
+
declare const unpackTwoBitsSecond: (value: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Unpacks two 16-bit integers (0~65535) from one 32-bit integer
|
|
12
|
+
*
|
|
13
|
+
* @param value - The 32-bit integer to unpack
|
|
14
|
+
* @param arr - An optional array to store the unpacked values, useful if you are trying to re-use arrays
|
|
15
|
+
*/
|
|
16
|
+
declare function unpackTwoBits(value: number, arr?: [a: number, b: number]): [a: number, b: number];
|
|
17
|
+
/** Packs three 10-bit integers (0~1023) into one 32-bit integer */
|
|
18
|
+
declare const packThreeBits: (a: number, b: number, c: number) => number;
|
|
19
|
+
declare const unpackThreeBitsFirst: (value: number) => number;
|
|
20
|
+
declare const unpackThreeBitsSecond: (value: number) => number;
|
|
21
|
+
declare const unpackThreeBitsThird: (value: number) => number;
|
|
22
|
+
/**
|
|
23
|
+
* Unpacks three 10-bit integers (0~1023) from one 32-bit integer
|
|
24
|
+
*
|
|
25
|
+
* @param value - The 32-bit integer to unpack
|
|
26
|
+
* @param arr - An optional array to store the unpacked values, useful if you are trying to re-use arrays
|
|
27
|
+
*/
|
|
28
|
+
declare function unpackThreeBits(value: number, arr?: [a: number, b: number, c: number]): [a: number, b: number, c: number];
|
|
29
|
+
|
|
30
|
+
export { bitCount, deleteBit, getBit, missingBit, packThreeBits, packTwoBits, setBit, unpackThreeBits, unpackThreeBitsFirst, unpackThreeBitsSecond, unpackThreeBitsThird, unpackTwoBits, unpackTwoBitsFirst, unpackTwoBitsSecond };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){return t-=t>>1&0x55555555,((t=(0x33333333&t)+(t>>2&0x33333333))+(t>>4)&0xf0f0f0f)*0x1010101>>24}const e=(t,e)=>!!(t&e),i=(t,e)=>!(t&e),n=(t,e)=>t|e,r=(t,e)=>t&~e,s=(t,e)=>t<<16|e,c=t=>t>>16&65535,o=t=>65535&t;function u(t,e=Array.from([,,].keys())){return e[0]=c(t),e[1]=o(t),e}const B=(t,e,i)=>t<<20|e<<10|i,a=t=>t>>20&1023,k=t=>t>>10&1023,p=t=>1023&t;function T(t,e=Array.from([,,,].keys())){return e[0]=a(t),e[1]=k(t),e[2]=p(t),e}export{t as bitCount,r as deleteBit,e as getBit,i as missingBit,B as packThreeBits,s as packTwoBits,n as setBit,T as unpackThreeBits,a as unpackThreeBitsFirst,k as unpackThreeBitsSecond,p as unpackThreeBitsThird,u as unpackTwoBits,c as unpackTwoBitsFirst,o as unpackTwoBitsSecond};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.fastStringArrayJoin=function(t,r){const n=t.length;if(0===n)return"";let e=t[0];for(let i=1;i<n;i++)e+=r,e+=t[i];return e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,r){const n=t.length;if(0===n)return"";let e=t[0];for(let o=1;o<n;o++)e+=r,e+=t[o];return e}export{t as fastStringArrayJoin};
|
package/fnv1a/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.fnv1a=function(t){let e=0x811c9dc5;for(let r=0,c=t.length;r<c;r++)e^=t.charCodeAt(r),e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24);return e>>>0};
|
package/fnv1a/index.d.ts
ADDED
package/fnv1a/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){let e=0x811c9dc5;for(let n=0,r=t.length;n<r;n++)e^=t.charCodeAt(n),e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24);return e>>>0}export{t as fnv1a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.fnv1a52=function(t){const e=t.length;let n=0,r=0,o=8997,c=0,s=33826,f=0,u=40164,x=0,a=52210;for(;n<e;)o^=t.charCodeAt(n++),r=435*o,c=435*s,f=435*u,x=435*a,f+=o<<8,x+=s<<8,c+=r>>>16,o=65535&r,f+=c>>>16,s=65535&c,a=x+(f>>>16)&65535,u=65535&f;return(15&a)*0x1000000000000+0x100000000*u+65536*s+(o^a>>4)};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){const n=t.length;let e=0,o=0,r=8997,c=0,f=33826,x=0,a=40164,h=0,l=52210;for(;e<n;)r^=t.charCodeAt(e++),o=435*r,c=435*f,x=435*a,h=435*l,x+=r<<8,h+=f<<8,c+=o>>>16,r=65535&o,x+=c>>>16,f=65535&c,l=h+(x>>>16)&65535,a=65535&x;return(15&l)*0x1000000000000+0x100000000*a+65536*f+(r^l>>4)}export{t as fnv1a52};
|
package/guard/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(r){switch(r){case null:return r=>null!==r;case void 0:return r=>void 0!==r;case!1:return r=>!1!==r;case"nullish":return r=>null!=r;case"falsy":return r=>!!r;default:throw TypeError("Invalid argument")}}function t(r){switch(r){case null:return r=>null===r;case void 0:return r=>void 0===r;case!1:return r=>!1===r;case"nullish":return r=>null==r;case"falsy":return r=>!r;case"truthy":return r=>!!r;default:throw TypeError("Invalid argument")}}const e=t("truthy"),s=t("falsy"),n=r(null),u=r("nullish");exports.is=t,exports.isFalsy=s,exports.isNonNull=n,exports.isNonNullish=u,exports.isTruthy=e,exports.not=r;
|
package/guard/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
17
|
+
export { is, isFalsy, isNonNull, isNonNullish, isTruthy, not };
|
package/guard/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(r){switch(r){case null:return r=>null!==r;case void 0:return r=>void 0!==r;case!1:return r=>!1!==r;case"nullish":return r=>null!=r;case"falsy":return r=>!!r;default:throw TypeError("Invalid argument")}}function n(r){switch(r){case null:return r=>null===r;case void 0:return r=>void 0===r;case!1:return r=>!1===r;case"nullish":return r=>null==r;case"falsy":return r=>!r;case"truthy":return r=>!!r;default:throw TypeError("Invalid argument")}}const l=n("truthy"),u=n("falsy"),e=r(null),t=r("nullish");export{n as is,u as isFalsy,e as isNonNull,t as isNonNullish,l as isTruthy,r as not};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.headersToObject=function(e){const r={};return new Headers(e).forEach((e,t)=>{r[t]=e}),r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){const r={};return new Headers(e).forEach((e,n)=>{r[n]=e}),r}export{e as headersToObject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.identity=function(t){return t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){return t}export{t as identity};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isProbablyIpv4=function(t){if(t.length<7||t.length>15)return!1;let e=0;for(let r=0;r<t.length;r+=1){const n=t.charCodeAt(r);if(46===n)e+=1;else if(n<48||n>57)return!1}return 3===e&&46!==t.charCodeAt(0)&&46!==t.charCodeAt(t.length-1)},exports.isProbablyIpv6=function(t){if(t.length<3)return!1;let e="["===t[0]?1:0,r=t.length;if("]"===t[r-1]&&(r-=1),r-e>39)return!1;let n=!1;for(;e<r;e+=1){const r=t.charCodeAt(e);if(58===r)n=!0;else if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=90))return!1}return n};
|
|
@@ -0,0 +1,8 @@
|
|
|
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){if(e.length<7||e.length>15)return!1;let t=0;for(let r=0;r<e.length;r+=1){const n=e.charCodeAt(r);if(46===n)t+=1;else if(n<48||n>57)return!1}return 3===t&&46!==e.charCodeAt(0)&&46!==e.charCodeAt(e.length-1)}function t(e){if(e.length<3)return!1;let t="["===e[0]?1:0,r=e.length;if("]"===e[r-1]&&(r-=1),r-t>39)return!1;let n=!1;for(;t<r;t+=1){const r=e.charCodeAt(t);if(58===r)n=!0;else if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=90))return!1}return n}export{e as isProbablyIpv4,t as isProbablyIpv6};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.mergeHeaders=function(e,r){const s=new Headers(e);return new Headers(r).forEach((e,r)=>{s.set(r,e)}),s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,r){const n=new Headers(e);return new Headers(r).forEach((e,r)=>{n.set(r,e)}),n}export{e as mergeHeaders};
|
package/noop/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.noop=function(){};
|
package/noop/index.d.ts
ADDED
package/noop/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(){}export{o as noop};
|
package/package.json
CHANGED
|
@@ -1,15 +1,159 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/SukkaW/foxts"
|
|
7
|
+
},
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"keywords": [
|
|
11
|
+
"sukka",
|
|
12
|
+
"sukkaw",
|
|
13
|
+
"utils"
|
|
14
|
+
],
|
|
15
|
+
"author": "SukkaW <https://skk.moe>",
|
|
9
16
|
"license": "MIT",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
"typeVersions": {
|
|
18
|
+
">=4.8": {
|
|
19
|
+
"*": [
|
|
20
|
+
"*"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"*": {
|
|
24
|
+
"*": [
|
|
25
|
+
"ts_version_4.8_and_above_is_required.d.ts"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": "./package.json",
|
|
31
|
+
"./sizes.json": "./sizes.json",
|
|
32
|
+
"./append-set-elements-to-array": {
|
|
33
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
36
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
39
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./bitwise": {
|
|
42
|
+
"types": "./bitwise/index.d.ts",
|
|
43
|
+
"import": {
|
|
44
|
+
"types": "./bitwise/index.d.ts",
|
|
45
|
+
"default": "./bitwise/index.mjs"
|
|
46
|
+
},
|
|
47
|
+
"require": "./bitwise/index.cjs",
|
|
48
|
+
"default": "./bitwise/index.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./async-write-to-stream": {
|
|
51
|
+
"types": "./async-write-to-stream/index.d.ts",
|
|
52
|
+
"import": {
|
|
53
|
+
"types": "./async-write-to-stream/index.d.ts",
|
|
54
|
+
"default": "./async-write-to-stream/index.mjs"
|
|
55
|
+
},
|
|
56
|
+
"require": "./async-write-to-stream/index.cjs",
|
|
57
|
+
"default": "./async-write-to-stream/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./fnv1a": {
|
|
60
|
+
"types": "./fnv1a/index.d.ts",
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./fnv1a/index.d.ts",
|
|
63
|
+
"default": "./fnv1a/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"require": "./fnv1a/index.cjs",
|
|
66
|
+
"default": "./fnv1a/index.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./fast-string-array-join": {
|
|
69
|
+
"types": "./fast-string-array-join/index.d.ts",
|
|
70
|
+
"import": {
|
|
71
|
+
"types": "./fast-string-array-join/index.d.ts",
|
|
72
|
+
"default": "./fast-string-array-join/index.mjs"
|
|
73
|
+
},
|
|
74
|
+
"require": "./fast-string-array-join/index.cjs",
|
|
75
|
+
"default": "./fast-string-array-join/index.cjs"
|
|
76
|
+
},
|
|
77
|
+
"./fnv1a52": {
|
|
78
|
+
"types": "./fnv1a52/index.d.ts",
|
|
79
|
+
"import": {
|
|
80
|
+
"types": "./fnv1a52/index.d.ts",
|
|
81
|
+
"default": "./fnv1a52/index.mjs"
|
|
82
|
+
},
|
|
83
|
+
"require": "./fnv1a52/index.cjs",
|
|
84
|
+
"default": "./fnv1a52/index.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./guard": {
|
|
87
|
+
"types": "./guard/index.d.ts",
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./guard/index.d.ts",
|
|
90
|
+
"default": "./guard/index.mjs"
|
|
91
|
+
},
|
|
92
|
+
"require": "./guard/index.cjs",
|
|
93
|
+
"default": "./guard/index.cjs"
|
|
94
|
+
},
|
|
95
|
+
"./headers-to-object": {
|
|
96
|
+
"types": "./headers-to-object/index.d.ts",
|
|
97
|
+
"import": {
|
|
98
|
+
"types": "./headers-to-object/index.d.ts",
|
|
99
|
+
"default": "./headers-to-object/index.mjs"
|
|
100
|
+
},
|
|
101
|
+
"require": "./headers-to-object/index.cjs",
|
|
102
|
+
"default": "./headers-to-object/index.cjs"
|
|
103
|
+
},
|
|
104
|
+
"./identity": {
|
|
105
|
+
"types": "./identity/index.d.ts",
|
|
106
|
+
"import": {
|
|
107
|
+
"types": "./identity/index.d.ts",
|
|
108
|
+
"default": "./identity/index.mjs"
|
|
109
|
+
},
|
|
110
|
+
"require": "./identity/index.cjs",
|
|
111
|
+
"default": "./identity/index.cjs"
|
|
112
|
+
},
|
|
113
|
+
"./is-probably-ip": {
|
|
114
|
+
"types": "./is-probably-ip/index.d.ts",
|
|
115
|
+
"import": {
|
|
116
|
+
"types": "./is-probably-ip/index.d.ts",
|
|
117
|
+
"default": "./is-probably-ip/index.mjs"
|
|
118
|
+
},
|
|
119
|
+
"require": "./is-probably-ip/index.cjs",
|
|
120
|
+
"default": "./is-probably-ip/index.cjs"
|
|
121
|
+
},
|
|
122
|
+
"./noop": {
|
|
123
|
+
"types": "./noop/index.d.ts",
|
|
124
|
+
"import": {
|
|
125
|
+
"types": "./noop/index.d.ts",
|
|
126
|
+
"default": "./noop/index.mjs"
|
|
127
|
+
},
|
|
128
|
+
"require": "./noop/index.cjs",
|
|
129
|
+
"default": "./noop/index.cjs"
|
|
130
|
+
},
|
|
131
|
+
"./simple-string-hash": {
|
|
132
|
+
"types": "./simple-string-hash/index.d.ts",
|
|
133
|
+
"import": {
|
|
134
|
+
"types": "./simple-string-hash/index.d.ts",
|
|
135
|
+
"default": "./simple-string-hash/index.mjs"
|
|
136
|
+
},
|
|
137
|
+
"require": "./simple-string-hash/index.cjs",
|
|
138
|
+
"default": "./simple-string-hash/index.cjs"
|
|
139
|
+
},
|
|
140
|
+
"./wait": {
|
|
141
|
+
"types": "./wait/index.d.ts",
|
|
142
|
+
"import": {
|
|
143
|
+
"types": "./wait/index.d.ts",
|
|
144
|
+
"default": "./wait/index.mjs"
|
|
145
|
+
},
|
|
146
|
+
"require": "./wait/index.cjs",
|
|
147
|
+
"default": "./wait/index.cjs"
|
|
148
|
+
},
|
|
149
|
+
"./merge-headers": {
|
|
150
|
+
"types": "./merge-headers/index.d.ts",
|
|
151
|
+
"import": {
|
|
152
|
+
"types": "./merge-headers/index.d.ts",
|
|
153
|
+
"default": "./merge-headers/index.mjs"
|
|
154
|
+
},
|
|
155
|
+
"require": "./merge-headers/index.cjs",
|
|
156
|
+
"default": "./merge-headers/index.cjs"
|
|
157
|
+
}
|
|
14
158
|
}
|
|
15
|
-
}
|
|
159
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("../fnv1a52/index.cjs");exports.simpleStringHash=function(n){return t.fnv1a52(n).toString(36)+n.length.toString(36)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fnv1a52 as t}from"../fnv1a52/index.mjs";function n(n){return t(n).toString(36)+n.length.toString(36)}export{n as simpleStringHash};
|
|
File without changes
|
package/wait/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.wait=function(t){return new Promise(e=>{setTimeout(e,t)})};
|
package/wait/index.d.ts
ADDED
package/wait/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return new Promise(t=>{setTimeout(t,e)})}export{e as wait};
|