foxts 1.1.5 → 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/package.json +31 -31
- 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/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,14 +38,14 @@
|
|
|
38
38
|
"require": "./add-array-elements-to-set/index.cjs",
|
|
39
39
|
"default": "./add-array-elements-to-set/index.cjs"
|
|
40
40
|
},
|
|
41
|
-
"./
|
|
42
|
-
"types": "./
|
|
41
|
+
"./ahocorasick": {
|
|
42
|
+
"types": "./ahocorasick/index.d.ts",
|
|
43
43
|
"import": {
|
|
44
|
-
"types": "./
|
|
45
|
-
"default": "./
|
|
44
|
+
"types": "./ahocorasick/index.d.ts",
|
|
45
|
+
"default": "./ahocorasick/index.mjs"
|
|
46
46
|
},
|
|
47
|
-
"require": "./
|
|
48
|
-
"default": "./
|
|
47
|
+
"require": "./ahocorasick/index.cjs",
|
|
48
|
+
"default": "./ahocorasick/index.cjs"
|
|
49
49
|
},
|
|
50
50
|
"./async-write-to-stream": {
|
|
51
51
|
"types": "./async-write-to-stream/index.d.ts",
|
|
@@ -56,23 +56,14 @@
|
|
|
56
56
|
"require": "./async-write-to-stream/index.cjs",
|
|
57
57
|
"default": "./async-write-to-stream/index.cjs"
|
|
58
58
|
},
|
|
59
|
-
"./
|
|
60
|
-
"types": "./
|
|
61
|
-
"import": {
|
|
62
|
-
"types": "./escape-string-regexp/index.d.ts",
|
|
63
|
-
"default": "./escape-string-regexp/index.mjs"
|
|
64
|
-
},
|
|
65
|
-
"require": "./escape-string-regexp/index.cjs",
|
|
66
|
-
"default": "./escape-string-regexp/index.cjs"
|
|
67
|
-
},
|
|
68
|
-
"./ahocorasick": {
|
|
69
|
-
"types": "./ahocorasick/index.d.ts",
|
|
59
|
+
"./append-set-elements-to-array": {
|
|
60
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
70
61
|
"import": {
|
|
71
|
-
"types": "./
|
|
72
|
-
"default": "./
|
|
62
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
63
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
73
64
|
},
|
|
74
|
-
"require": "./
|
|
75
|
-
"default": "./
|
|
65
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
66
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
76
67
|
},
|
|
77
68
|
"./fast-string-array-join": {
|
|
78
69
|
"types": "./fast-string-array-join/index.d.ts",
|
|
@@ -92,6 +83,15 @@
|
|
|
92
83
|
"require": "./bitwise/index.cjs",
|
|
93
84
|
"default": "./bitwise/index.cjs"
|
|
94
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": {
|
|
@@ -182,15 +182,6 @@
|
|
|
182
182
|
"require": "./repool/index.cjs",
|
|
183
183
|
"default": "./repool/index.cjs"
|
|
184
184
|
},
|
|
185
|
-
"./retrie": {
|
|
186
|
-
"types": "./retrie/index.d.ts",
|
|
187
|
-
"import": {
|
|
188
|
-
"types": "./retrie/index.d.ts",
|
|
189
|
-
"default": "./retrie/index.mjs"
|
|
190
|
-
},
|
|
191
|
-
"require": "./retrie/index.cjs",
|
|
192
|
-
"default": "./retrie/index.cjs"
|
|
193
|
-
},
|
|
194
185
|
"./noop": {
|
|
195
186
|
"types": "./noop/index.d.ts",
|
|
196
187
|
"import": {
|
|
@@ -209,6 +200,15 @@
|
|
|
209
200
|
"require": "./serialized-memo/index.cjs",
|
|
210
201
|
"default": "./serialized-memo/index.cjs"
|
|
211
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
|
+
},
|
|
212
212
|
"./simple-string-hash": {
|
|
213
213
|
"types": "./simple-string-hash/index.d.ts",
|
|
214
214
|
"import": {
|
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};
|