foxts 1.5.1 → 1.6.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=new Map;function t(e){return Array.from(Array(e).keys())}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function
|
|
1
|
+
"use strict";const e=new Map;function t(e){return Array.from(Array(e).keys())}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function o(e){let r,o;return n.has(e)&&(o=(r=n.get(e)).deref()),o||(r=new WeakRef(o=t(e)),n.set(e,r)),o}const s="function"==typeof WeakRef?o:r,a=s(0);exports.EMPTY_ARRAY=a,exports.createFixedArray=s,exports.createFixedArrayWithGC=o,exports.createFixedArrayWithoutGC=r;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare function createFixedArrayWithoutGC(length: number): readonly number[];
|
|
2
2
|
declare function createFixedArrayWithGC(length: number): readonly number[];
|
|
3
3
|
declare const createFixedArray: typeof createFixedArrayWithGC;
|
|
4
|
+
declare const EMPTY_ARRAY: readonly number[];
|
|
4
5
|
|
|
5
|
-
export { createFixedArray, createFixedArrayWithGC, createFixedArrayWithoutGC };
|
|
6
|
+
export { EMPTY_ARRAY, createFixedArray, createFixedArrayWithGC, createFixedArrayWithoutGC };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=new Map;function t(e){return Array.from(Array(e).keys())}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function a(e){let r,a;return n.has(e)&&(a=(r=n.get(e)).deref()),a||(r=new WeakRef(a=t(e)),n.set(e,r)),a}const o="function"==typeof WeakRef?a:r;export{o as createFixedArray,a as createFixedArrayWithGC,r as createFixedArrayWithoutGC};
|
|
1
|
+
const e=new Map;function t(e){return Array.from(Array(e).keys())}function r(r){if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}const n=new Map;function a(e){let r,a;return n.has(e)&&(a=(r=n.get(e)).deref()),a||(r=new WeakRef(a=t(e)),n.set(e,r)),a}const o="function"==typeof WeakRef?a:r,c=o(0);export{c as EMPTY_ARRAY,o as createFixedArray,a as createFixedArrayWithGC,r as createFixedArrayWithoutGC};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=/["&'<>]/;exports.escapeHTML=function(t){const c=e.exec(t);if(null===c)return t;let s="",a="",r=c.index,n=0;for(const e=t.length;r<e;r++){switch(t.charCodeAt(r)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}n!==r&&(a+=t.slice(n,r)),n=r+1,a+=s}return n===r?a:a+t.slice(n,r)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/["&'<>]/;function c(c){const t=e.exec(c);if(null===t)return c;let a="",n="",r=t.index,s=0;for(const e=c.length;r<e;r++){switch(c.charCodeAt(r)){case 34:a=""";break;case 38:a="&";break;case 39:a="'";break;case 60:a="<";break;case 62:a=">";break;default:continue}s!==r&&(n+=c.slice(s,r)),s=r+1,n+=a}return s===r?n:n+c.slice(s,r)}export{c as escapeHTML};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/SukkaW/foxts"
|
|
@@ -50,15 +50,6 @@
|
|
|
50
50
|
"require": "./ahocorasick/index.cjs",
|
|
51
51
|
"default": "./ahocorasick/index.cjs"
|
|
52
52
|
},
|
|
53
|
-
"./append-set-elements-to-array": {
|
|
54
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
55
|
-
"import": {
|
|
56
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
57
|
-
"default": "./append-set-elements-to-array/index.mjs"
|
|
58
|
-
},
|
|
59
|
-
"require": "./append-set-elements-to-array/index.cjs",
|
|
60
|
-
"default": "./append-set-elements-to-array/index.cjs"
|
|
61
|
-
},
|
|
62
53
|
"./async-write-to-stream": {
|
|
63
54
|
"types": "./async-write-to-stream/index.d.ts",
|
|
64
55
|
"import": {
|
|
@@ -68,15 +59,6 @@
|
|
|
68
59
|
"require": "./async-write-to-stream/index.cjs",
|
|
69
60
|
"default": "./async-write-to-stream/index.cjs"
|
|
70
61
|
},
|
|
71
|
-
"./bitwise": {
|
|
72
|
-
"types": "./bitwise/index.d.ts",
|
|
73
|
-
"import": {
|
|
74
|
-
"types": "./bitwise/index.d.ts",
|
|
75
|
-
"default": "./bitwise/index.mjs"
|
|
76
|
-
},
|
|
77
|
-
"require": "./bitwise/index.cjs",
|
|
78
|
-
"default": "./bitwise/index.cjs"
|
|
79
|
-
},
|
|
80
62
|
"./create-fixed-array": {
|
|
81
63
|
"types": "./create-fixed-array/index.d.ts",
|
|
82
64
|
"import": {
|
|
@@ -95,14 +77,41 @@
|
|
|
95
77
|
"require": "./detect-eol/index.cjs",
|
|
96
78
|
"default": "./detect-eol/index.cjs"
|
|
97
79
|
},
|
|
98
|
-
"./
|
|
99
|
-
"types": "./
|
|
80
|
+
"./append-set-elements-to-array": {
|
|
81
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
100
82
|
"import": {
|
|
101
|
-
"types": "./
|
|
102
|
-
"default": "./
|
|
83
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
84
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
103
85
|
},
|
|
104
|
-
"require": "./
|
|
105
|
-
"default": "./
|
|
86
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
87
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
88
|
+
},
|
|
89
|
+
"./bitwise": {
|
|
90
|
+
"types": "./bitwise/index.d.ts",
|
|
91
|
+
"import": {
|
|
92
|
+
"types": "./bitwise/index.d.ts",
|
|
93
|
+
"default": "./bitwise/index.mjs"
|
|
94
|
+
},
|
|
95
|
+
"require": "./bitwise/index.cjs",
|
|
96
|
+
"default": "./bitwise/index.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./escape-html": {
|
|
99
|
+
"types": "./escape-html/index.d.ts",
|
|
100
|
+
"import": {
|
|
101
|
+
"types": "./escape-html/index.d.ts",
|
|
102
|
+
"default": "./escape-html/index.mjs"
|
|
103
|
+
},
|
|
104
|
+
"require": "./escape-html/index.cjs",
|
|
105
|
+
"default": "./escape-html/index.cjs"
|
|
106
|
+
},
|
|
107
|
+
"./fast-string-array-join": {
|
|
108
|
+
"types": "./fast-string-array-join/index.d.ts",
|
|
109
|
+
"import": {
|
|
110
|
+
"types": "./fast-string-array-join/index.d.ts",
|
|
111
|
+
"default": "./fast-string-array-join/index.mjs"
|
|
112
|
+
},
|
|
113
|
+
"require": "./fast-string-array-join/index.cjs",
|
|
114
|
+
"default": "./fast-string-array-join/index.cjs"
|
|
106
115
|
},
|
|
107
116
|
"./fifo": {
|
|
108
117
|
"types": "./fifo/index.d.ts",
|
|
@@ -131,6 +140,24 @@
|
|
|
131
140
|
"require": "./fnv1a52/index.cjs",
|
|
132
141
|
"default": "./fnv1a52/index.cjs"
|
|
133
142
|
},
|
|
143
|
+
"./escape-string-regexp": {
|
|
144
|
+
"types": "./escape-string-regexp/index.d.ts",
|
|
145
|
+
"import": {
|
|
146
|
+
"types": "./escape-string-regexp/index.d.ts",
|
|
147
|
+
"default": "./escape-string-regexp/index.mjs"
|
|
148
|
+
},
|
|
149
|
+
"require": "./escape-string-regexp/index.cjs",
|
|
150
|
+
"default": "./escape-string-regexp/index.cjs"
|
|
151
|
+
},
|
|
152
|
+
"./identity": {
|
|
153
|
+
"types": "./identity/index.d.ts",
|
|
154
|
+
"import": {
|
|
155
|
+
"types": "./identity/index.d.ts",
|
|
156
|
+
"default": "./identity/index.mjs"
|
|
157
|
+
},
|
|
158
|
+
"require": "./identity/index.cjs",
|
|
159
|
+
"default": "./identity/index.cjs"
|
|
160
|
+
},
|
|
134
161
|
"./guard": {
|
|
135
162
|
"types": "./guard/index.d.ts",
|
|
136
163
|
"import": {
|
|
@@ -149,14 +176,14 @@
|
|
|
149
176
|
"require": "./headers-to-object/index.cjs",
|
|
150
177
|
"default": "./headers-to-object/index.cjs"
|
|
151
178
|
},
|
|
152
|
-
"./
|
|
153
|
-
"types": "./
|
|
179
|
+
"./noop": {
|
|
180
|
+
"types": "./noop/index.d.ts",
|
|
154
181
|
"import": {
|
|
155
|
-
"types": "./
|
|
156
|
-
"default": "./
|
|
182
|
+
"types": "./noop/index.d.ts",
|
|
183
|
+
"default": "./noop/index.mjs"
|
|
157
184
|
},
|
|
158
|
-
"require": "./
|
|
159
|
-
"default": "./
|
|
185
|
+
"require": "./noop/index.cjs",
|
|
186
|
+
"default": "./noop/index.cjs"
|
|
160
187
|
},
|
|
161
188
|
"./is-probably-ip": {
|
|
162
189
|
"types": "./is-probably-ip/index.d.ts",
|
|
@@ -176,14 +203,14 @@
|
|
|
176
203
|
"require": "./merge-headers/index.cjs",
|
|
177
204
|
"default": "./merge-headers/index.cjs"
|
|
178
205
|
},
|
|
179
|
-
"./
|
|
180
|
-
"types": "./
|
|
206
|
+
"./pick-random": {
|
|
207
|
+
"types": "./pick-random/index.d.ts",
|
|
181
208
|
"import": {
|
|
182
|
-
"types": "./
|
|
183
|
-
"default": "./
|
|
209
|
+
"types": "./pick-random/index.d.ts",
|
|
210
|
+
"default": "./pick-random/index.mjs"
|
|
184
211
|
},
|
|
185
|
-
"require": "./
|
|
186
|
-
"default": "./
|
|
212
|
+
"require": "./pick-random/index.cjs",
|
|
213
|
+
"default": "./pick-random/index.cjs"
|
|
187
214
|
},
|
|
188
215
|
"./once": {
|
|
189
216
|
"types": "./once/index.d.ts",
|
|
@@ -194,15 +221,6 @@
|
|
|
194
221
|
"require": "./once/index.cjs",
|
|
195
222
|
"default": "./once/index.cjs"
|
|
196
223
|
},
|
|
197
|
-
"./pick-random": {
|
|
198
|
-
"types": "./pick-random/index.d.ts",
|
|
199
|
-
"import": {
|
|
200
|
-
"types": "./pick-random/index.d.ts",
|
|
201
|
-
"default": "./pick-random/index.mjs"
|
|
202
|
-
},
|
|
203
|
-
"require": "./pick-random/index.cjs",
|
|
204
|
-
"default": "./pick-random/index.cjs"
|
|
205
|
-
},
|
|
206
224
|
"./random-int": {
|
|
207
225
|
"types": "./random-int/index.d.ts",
|
|
208
226
|
"import": {
|
|
@@ -239,15 +257,6 @@
|
|
|
239
257
|
"require": "./serialized-memo/index.cjs",
|
|
240
258
|
"default": "./serialized-memo/index.cjs"
|
|
241
259
|
},
|
|
242
|
-
"./simple-string-hash": {
|
|
243
|
-
"types": "./simple-string-hash/index.d.ts",
|
|
244
|
-
"import": {
|
|
245
|
-
"types": "./simple-string-hash/index.d.ts",
|
|
246
|
-
"default": "./simple-string-hash/index.mjs"
|
|
247
|
-
},
|
|
248
|
-
"require": "./simple-string-hash/index.cjs",
|
|
249
|
-
"default": "./simple-string-hash/index.cjs"
|
|
250
|
-
},
|
|
251
260
|
"./tagged": {
|
|
252
261
|
"types": "./tagged/index.d.ts",
|
|
253
262
|
"import": {
|
|
@@ -257,6 +266,15 @@
|
|
|
257
266
|
"require": "./tagged/index.cjs",
|
|
258
267
|
"default": "./tagged/index.cjs"
|
|
259
268
|
},
|
|
269
|
+
"./simple-string-hash": {
|
|
270
|
+
"types": "./simple-string-hash/index.d.ts",
|
|
271
|
+
"import": {
|
|
272
|
+
"types": "./simple-string-hash/index.d.ts",
|
|
273
|
+
"default": "./simple-string-hash/index.mjs"
|
|
274
|
+
},
|
|
275
|
+
"require": "./simple-string-hash/index.cjs",
|
|
276
|
+
"default": "./simple-string-hash/index.cjs"
|
|
277
|
+
},
|
|
260
278
|
"./wait": {
|
|
261
279
|
"types": "./wait/index.d.ts",
|
|
262
280
|
"import": {
|
|
@@ -265,15 +283,6 @@
|
|
|
265
283
|
},
|
|
266
284
|
"require": "./wait/index.cjs",
|
|
267
285
|
"default": "./wait/index.cjs"
|
|
268
|
-
},
|
|
269
|
-
"./fast-string-array-join": {
|
|
270
|
-
"types": "./fast-string-array-join/index.d.ts",
|
|
271
|
-
"import": {
|
|
272
|
-
"types": "./fast-string-array-join/index.d.ts",
|
|
273
|
-
"default": "./fast-string-array-join/index.mjs"
|
|
274
|
-
},
|
|
275
|
-
"require": "./fast-string-array-join/index.cjs",
|
|
276
|
-
"default": "./fast-string-array-join/index.cjs"
|
|
277
286
|
}
|
|
278
287
|
}
|
|
279
288
|
}
|