foxts 1.1.4 → 1.1.6
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/escape-string-regexp/index.cjs +1 -1
- package/escape-string-regexp/index.mjs +1 -1
- package/once/index.cjs +1 -0
- package/once/index.d.ts +3 -0
- package/once/index.mjs +1 -0
- package/package.json +61 -52
- package/wait/index.cjs +1 -1
- package/wait/index.d.ts +2 -1
- package/wait/index.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=/[$()*+.?[\\\]^{|}]/g;exports.escapeStringRegexp=function(
|
|
1
|
+
"use strict";const e=/[$()*+.?[\\\]^{|}-]/g,t={"\\":"\\\\","^":"\\^",$:"\\$",".":"\\.","*":"\\*","+":"\\+","?":"\\?","(":"\\(",")":"\\)","[":"\\[","]":"\\]","{":"\\{","}":"\\}","|":"\\|","-":"\\x2d"},r=e=>t[e];exports.escapeStringRegexp=function(t){return t.replaceAll(e,r)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=/[$()*+.?[\\\]^{|}]/g
|
|
1
|
+
const e=/[$()*+.?[\\\]^{|}-]/g,n={"\\":"\\\\","^":"\\^",$:"\\$",".":"\\.","*":"\\*","+":"\\+","?":"\\?","(":"\\(",")":"\\)","[":"\\[","]":"\\]","{":"\\{","}":"\\}","|":"\\|","-":"\\x2d"},r=e=>n[e];function t(n){return n.replaceAll(e,r)}export{t as escapeStringRegexp};
|
package/once/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.once=function(t){let e,n=!1;return()=>(n||(n=!0,e=t()),e)};
|
package/once/index.d.ts
ADDED
package/once/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let n,t=!1;return()=>(t||(t=!0,n=e()),n)}export{e as once};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/SukkaW/foxts"
|
|
@@ -38,24 +38,6 @@
|
|
|
38
38
|
"require": "./add-array-elements-to-set/index.cjs",
|
|
39
39
|
"default": "./add-array-elements-to-set/index.cjs"
|
|
40
40
|
},
|
|
41
|
-
"./append-set-elements-to-array": {
|
|
42
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
43
|
-
"import": {
|
|
44
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
45
|
-
"default": "./append-set-elements-to-array/index.mjs"
|
|
46
|
-
},
|
|
47
|
-
"require": "./append-set-elements-to-array/index.cjs",
|
|
48
|
-
"default": "./append-set-elements-to-array/index.cjs"
|
|
49
|
-
},
|
|
50
|
-
"./bitwise": {
|
|
51
|
-
"types": "./bitwise/index.d.ts",
|
|
52
|
-
"import": {
|
|
53
|
-
"types": "./bitwise/index.d.ts",
|
|
54
|
-
"default": "./bitwise/index.mjs"
|
|
55
|
-
},
|
|
56
|
-
"require": "./bitwise/index.cjs",
|
|
57
|
-
"default": "./bitwise/index.cjs"
|
|
58
|
-
},
|
|
59
41
|
"./ahocorasick": {
|
|
60
42
|
"types": "./ahocorasick/index.d.ts",
|
|
61
43
|
"import": {
|
|
@@ -65,15 +47,6 @@
|
|
|
65
47
|
"require": "./ahocorasick/index.cjs",
|
|
66
48
|
"default": "./ahocorasick/index.cjs"
|
|
67
49
|
},
|
|
68
|
-
"./escape-string-regexp": {
|
|
69
|
-
"types": "./escape-string-regexp/index.d.ts",
|
|
70
|
-
"import": {
|
|
71
|
-
"types": "./escape-string-regexp/index.d.ts",
|
|
72
|
-
"default": "./escape-string-regexp/index.mjs"
|
|
73
|
-
},
|
|
74
|
-
"require": "./escape-string-regexp/index.cjs",
|
|
75
|
-
"default": "./escape-string-regexp/index.cjs"
|
|
76
|
-
},
|
|
77
50
|
"./async-write-to-stream": {
|
|
78
51
|
"types": "./async-write-to-stream/index.d.ts",
|
|
79
52
|
"import": {
|
|
@@ -83,6 +56,15 @@
|
|
|
83
56
|
"require": "./async-write-to-stream/index.cjs",
|
|
84
57
|
"default": "./async-write-to-stream/index.cjs"
|
|
85
58
|
},
|
|
59
|
+
"./append-set-elements-to-array": {
|
|
60
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
63
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
66
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
67
|
+
},
|
|
86
68
|
"./fast-string-array-join": {
|
|
87
69
|
"types": "./fast-string-array-join/index.d.ts",
|
|
88
70
|
"import": {
|
|
@@ -92,6 +74,24 @@
|
|
|
92
74
|
"require": "./fast-string-array-join/index.cjs",
|
|
93
75
|
"default": "./fast-string-array-join/index.cjs"
|
|
94
76
|
},
|
|
77
|
+
"./bitwise": {
|
|
78
|
+
"types": "./bitwise/index.d.ts",
|
|
79
|
+
"import": {
|
|
80
|
+
"types": "./bitwise/index.d.ts",
|
|
81
|
+
"default": "./bitwise/index.mjs"
|
|
82
|
+
},
|
|
83
|
+
"require": "./bitwise/index.cjs",
|
|
84
|
+
"default": "./bitwise/index.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./escape-string-regexp": {
|
|
87
|
+
"types": "./escape-string-regexp/index.d.ts",
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./escape-string-regexp/index.d.ts",
|
|
90
|
+
"default": "./escape-string-regexp/index.mjs"
|
|
91
|
+
},
|
|
92
|
+
"require": "./escape-string-regexp/index.cjs",
|
|
93
|
+
"default": "./escape-string-regexp/index.cjs"
|
|
94
|
+
},
|
|
95
95
|
"./fifo": {
|
|
96
96
|
"types": "./fifo/index.d.ts",
|
|
97
97
|
"import": {
|
|
@@ -119,6 +119,15 @@
|
|
|
119
119
|
"require": "./fnv1a52/index.cjs",
|
|
120
120
|
"default": "./fnv1a52/index.cjs"
|
|
121
121
|
},
|
|
122
|
+
"./guard": {
|
|
123
|
+
"types": "./guard/index.d.ts",
|
|
124
|
+
"import": {
|
|
125
|
+
"types": "./guard/index.d.ts",
|
|
126
|
+
"default": "./guard/index.mjs"
|
|
127
|
+
},
|
|
128
|
+
"require": "./guard/index.cjs",
|
|
129
|
+
"default": "./guard/index.cjs"
|
|
130
|
+
},
|
|
122
131
|
"./headers-to-object": {
|
|
123
132
|
"types": "./headers-to-object/index.d.ts",
|
|
124
133
|
"import": {
|
|
@@ -155,23 +164,14 @@
|
|
|
155
164
|
"require": "./merge-headers/index.cjs",
|
|
156
165
|
"default": "./merge-headers/index.cjs"
|
|
157
166
|
},
|
|
158
|
-
"./
|
|
159
|
-
"types": "./
|
|
160
|
-
"import": {
|
|
161
|
-
"types": "./noop/index.d.ts",
|
|
162
|
-
"default": "./noop/index.mjs"
|
|
163
|
-
},
|
|
164
|
-
"require": "./noop/index.cjs",
|
|
165
|
-
"default": "./noop/index.cjs"
|
|
166
|
-
},
|
|
167
|
-
"./retrie": {
|
|
168
|
-
"types": "./retrie/index.d.ts",
|
|
167
|
+
"./once": {
|
|
168
|
+
"types": "./once/index.d.ts",
|
|
169
169
|
"import": {
|
|
170
|
-
"types": "./
|
|
171
|
-
"default": "./
|
|
170
|
+
"types": "./once/index.d.ts",
|
|
171
|
+
"default": "./once/index.mjs"
|
|
172
172
|
},
|
|
173
|
-
"require": "./
|
|
174
|
-
"default": "./
|
|
173
|
+
"require": "./once/index.cjs",
|
|
174
|
+
"default": "./once/index.cjs"
|
|
175
175
|
},
|
|
176
176
|
"./repool": {
|
|
177
177
|
"types": "./repool/index.d.ts",
|
|
@@ -182,6 +182,15 @@
|
|
|
182
182
|
"require": "./repool/index.cjs",
|
|
183
183
|
"default": "./repool/index.cjs"
|
|
184
184
|
},
|
|
185
|
+
"./noop": {
|
|
186
|
+
"types": "./noop/index.d.ts",
|
|
187
|
+
"import": {
|
|
188
|
+
"types": "./noop/index.d.ts",
|
|
189
|
+
"default": "./noop/index.mjs"
|
|
190
|
+
},
|
|
191
|
+
"require": "./noop/index.cjs",
|
|
192
|
+
"default": "./noop/index.cjs"
|
|
193
|
+
},
|
|
185
194
|
"./serialized-memo": {
|
|
186
195
|
"types": "./serialized-memo/index.d.ts",
|
|
187
196
|
"import": {
|
|
@@ -191,6 +200,15 @@
|
|
|
191
200
|
"require": "./serialized-memo/index.cjs",
|
|
192
201
|
"default": "./serialized-memo/index.cjs"
|
|
193
202
|
},
|
|
203
|
+
"./retrie": {
|
|
204
|
+
"types": "./retrie/index.d.ts",
|
|
205
|
+
"import": {
|
|
206
|
+
"types": "./retrie/index.d.ts",
|
|
207
|
+
"default": "./retrie/index.mjs"
|
|
208
|
+
},
|
|
209
|
+
"require": "./retrie/index.cjs",
|
|
210
|
+
"default": "./retrie/index.cjs"
|
|
211
|
+
},
|
|
194
212
|
"./simple-string-hash": {
|
|
195
213
|
"types": "./simple-string-hash/index.d.ts",
|
|
196
214
|
"import": {
|
|
@@ -217,15 +235,6 @@
|
|
|
217
235
|
},
|
|
218
236
|
"require": "./wait/index.cjs",
|
|
219
237
|
"default": "./wait/index.cjs"
|
|
220
|
-
},
|
|
221
|
-
"./guard": {
|
|
222
|
-
"types": "./guard/index.d.ts",
|
|
223
|
-
"import": {
|
|
224
|
-
"types": "./guard/index.d.ts",
|
|
225
|
-
"default": "./guard/index.mjs"
|
|
226
|
-
},
|
|
227
|
-
"require": "./guard/index.cjs",
|
|
228
|
-
"default": "./guard/index.cjs"
|
|
229
238
|
}
|
|
230
239
|
}
|
|
231
240
|
}
|
package/wait/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.wait=function(t){return new Promise(
|
|
1
|
+
"use strict";exports.wait=function(e){return new Promise(t=>{setTimeout(t,e)})},exports.waitWithAbort=function(e,t){return new Promise((r,n)=>{if(t.aborted){n(t.reason);return}const o=setTimeout(()=>{t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(o),t.removeEventListener("abort",i),n(t.reason)}t.addEventListener("abort",i)})};
|
package/wait/index.d.ts
CHANGED
package/wait/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return new Promise(t=>{setTimeout(t,e)})}export{e as wait};
|
|
1
|
+
function e(e){return new Promise(t=>{setTimeout(t,e)})}function t(e,t){return new Promise((r,n)=>{if(t.aborted){n(t.reason);return}const 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};
|