foxts 1.0.8 → 1.0.9
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=/[$()*+.?[\\\]^{|}]/g;exports.escapeStringRegexp=function(r){return r.replaceAll(e,"\\$&").replaceAll("-","\\x2d")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/[$()*+.?[\\\]^{|}]/g;function l(l){return l.replaceAll(e,"\\$&").replaceAll("-","\\x2d")}export{l as escapeStringRegexp};
|
package/fifo/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e;e=Symbol.iterator;class t{head=null;tail=null;$size=0;constructor(){this.clear()}enqueue(e){const t=[e,null];this.head?this.tail[1]=t:this.head=t,this.tail=t,this.$size++}push=this.enqueue;dequeue(){const e=this.head;if(e)return this.head=this.head[1],this.$size--,e[0]}shift=this.dequeue;peek(){return this.head?.[0]}clear(){this.head=null,this.tail=null,this.$size=0}get size(){return this.$size}*[e](){let e=this.head;for(;e;)yield e[0],e=e[1]}}exports.FIFO=t;
|
|
1
|
+
"use strict";var e;e=Symbol.iterator;class t{head=null;tail=null;$size=0;constructor(){this.clear()}enqueue(e){const t=[e,null];this.head?this.tail[1]=t:this.head=t,this.tail=t,this.$size++}push=this.enqueue;dequeue(){const e=this.head;if(e)return this.head=this.head[1],this.$size--,e[0]}shift=this.dequeue;peek(){return this.head?.[0]}clear(){this.head=null,this.tail=null,this.$size=0}get size(){return this.$size}get length(){return this.$size}*[e](){let e=this.head;for(;e;)yield e[0],e=e[1]}}exports.FIFO=t;
|
package/fifo/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Checkout https://npm.im/fast-fifo if performance is critical */
|
|
1
2
|
declare class FIFO<T> {
|
|
2
3
|
private head;
|
|
3
4
|
private tail;
|
|
@@ -10,6 +11,7 @@ declare class FIFO<T> {
|
|
|
10
11
|
peek(): T | undefined;
|
|
11
12
|
clear(): void;
|
|
12
13
|
get size(): number;
|
|
14
|
+
get length(): number;
|
|
13
15
|
[Symbol.iterator](): Generator<T, void, unknown>;
|
|
14
16
|
}
|
|
15
17
|
|
package/fifo/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=Symbol.iterator;class t{head=null;tail=null;$size=0;constructor(){this.clear()}enqueue(e){const t=[e,null];this.head?this.tail[1]=t:this.head=t,this.tail=t,this.$size++}push=this.enqueue;dequeue(){const e=this.head;if(e)return this.head=this.head[1],this.$size--,e[0]}shift=this.dequeue;peek(){return this.head?.[0]}clear(){this.head=null,this.tail=null,this.$size=0}get size(){return this.$size}*[e](){let e=this.head;for(;e;)yield e[0],e=e[1]}}export{t as FIFO};
|
|
1
|
+
var e;e=Symbol.iterator;class t{head=null;tail=null;$size=0;constructor(){this.clear()}enqueue(e){const t=[e,null];this.head?this.tail[1]=t:this.head=t,this.tail=t,this.$size++}push=this.enqueue;dequeue(){const e=this.head;if(e)return this.head=this.head[1],this.$size--,e[0]}shift=this.dequeue;peek(){return this.head?.[0]}clear(){this.head=null,this.tail=null,this.$size=0}get size(){return this.$size}get length(){return this.$size}*[e](){let e=this.head;for(;e;)yield e[0],e=e[1]}}export{t as FIFO};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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
|
+
"./append-set-elements-to-array": {
|
|
42
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
43
43
|
"import": {
|
|
44
|
-
"types": "./
|
|
45
|
-
"default": "./
|
|
44
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
45
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
46
46
|
},
|
|
47
|
-
"require": "./
|
|
48
|
-
"default": "./
|
|
47
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
48
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
49
49
|
},
|
|
50
50
|
"./async-write-to-stream": {
|
|
51
51
|
"types": "./async-write-to-stream/index.d.ts",
|
|
@@ -56,6 +56,15 @@
|
|
|
56
56
|
"require": "./async-write-to-stream/index.cjs",
|
|
57
57
|
"default": "./async-write-to-stream/index.cjs"
|
|
58
58
|
},
|
|
59
|
+
"./ahocorasick": {
|
|
60
|
+
"types": "./ahocorasick/index.d.ts",
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./ahocorasick/index.d.ts",
|
|
63
|
+
"default": "./ahocorasick/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"require": "./ahocorasick/index.cjs",
|
|
66
|
+
"default": "./ahocorasick/index.cjs"
|
|
67
|
+
},
|
|
59
68
|
"./bitwise": {
|
|
60
69
|
"types": "./bitwise/index.d.ts",
|
|
61
70
|
"import": {
|
|
@@ -65,15 +74,6 @@
|
|
|
65
74
|
"require": "./bitwise/index.cjs",
|
|
66
75
|
"default": "./bitwise/index.cjs"
|
|
67
76
|
},
|
|
68
|
-
"./append-set-elements-to-array": {
|
|
69
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
70
|
-
"import": {
|
|
71
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
72
|
-
"default": "./append-set-elements-to-array/index.mjs"
|
|
73
|
-
},
|
|
74
|
-
"require": "./append-set-elements-to-array/index.cjs",
|
|
75
|
-
"default": "./append-set-elements-to-array/index.cjs"
|
|
76
|
-
},
|
|
77
77
|
"./fast-string-array-join": {
|
|
78
78
|
"types": "./fast-string-array-join/index.d.ts",
|
|
79
79
|
"import": {
|
|
@@ -83,6 +83,15 @@
|
|
|
83
83
|
"require": "./fast-string-array-join/index.cjs",
|
|
84
84
|
"default": "./fast-string-array-join/index.cjs"
|
|
85
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
|
+
},
|
|
86
95
|
"./fifo": {
|
|
87
96
|
"types": "./fifo/index.d.ts",
|
|
88
97
|
"import": {
|
|
@@ -119,15 +128,6 @@
|
|
|
119
128
|
"require": "./fnv1a52/index.cjs",
|
|
120
129
|
"default": "./fnv1a52/index.cjs"
|
|
121
130
|
},
|
|
122
|
-
"./headers-to-object": {
|
|
123
|
-
"types": "./headers-to-object/index.d.ts",
|
|
124
|
-
"import": {
|
|
125
|
-
"types": "./headers-to-object/index.d.ts",
|
|
126
|
-
"default": "./headers-to-object/index.mjs"
|
|
127
|
-
},
|
|
128
|
-
"require": "./headers-to-object/index.cjs",
|
|
129
|
-
"default": "./headers-to-object/index.cjs"
|
|
130
|
-
},
|
|
131
131
|
"./identity": {
|
|
132
132
|
"types": "./identity/index.d.ts",
|
|
133
133
|
"import": {
|
|
@@ -137,6 +137,15 @@
|
|
|
137
137
|
"require": "./identity/index.cjs",
|
|
138
138
|
"default": "./identity/index.cjs"
|
|
139
139
|
},
|
|
140
|
+
"./headers-to-object": {
|
|
141
|
+
"types": "./headers-to-object/index.d.ts",
|
|
142
|
+
"import": {
|
|
143
|
+
"types": "./headers-to-object/index.d.ts",
|
|
144
|
+
"default": "./headers-to-object/index.mjs"
|
|
145
|
+
},
|
|
146
|
+
"require": "./headers-to-object/index.cjs",
|
|
147
|
+
"default": "./headers-to-object/index.cjs"
|
|
148
|
+
},
|
|
140
149
|
"./is-probably-ip": {
|
|
141
150
|
"types": "./is-probably-ip/index.d.ts",
|
|
142
151
|
"import": {
|
|
@@ -146,15 +155,6 @@
|
|
|
146
155
|
"require": "./is-probably-ip/index.cjs",
|
|
147
156
|
"default": "./is-probably-ip/index.cjs"
|
|
148
157
|
},
|
|
149
|
-
"./noop": {
|
|
150
|
-
"types": "./noop/index.d.ts",
|
|
151
|
-
"import": {
|
|
152
|
-
"types": "./noop/index.d.ts",
|
|
153
|
-
"default": "./noop/index.mjs"
|
|
154
|
-
},
|
|
155
|
-
"require": "./noop/index.cjs",
|
|
156
|
-
"default": "./noop/index.cjs"
|
|
157
|
-
},
|
|
158
158
|
"./merge-headers": {
|
|
159
159
|
"types": "./merge-headers/index.d.ts",
|
|
160
160
|
"import": {
|
|
@@ -164,6 +164,15 @@
|
|
|
164
164
|
"require": "./merge-headers/index.cjs",
|
|
165
165
|
"default": "./merge-headers/index.cjs"
|
|
166
166
|
},
|
|
167
|
+
"./noop": {
|
|
168
|
+
"types": "./noop/index.d.ts",
|
|
169
|
+
"import": {
|
|
170
|
+
"types": "./noop/index.d.ts",
|
|
171
|
+
"default": "./noop/index.mjs"
|
|
172
|
+
},
|
|
173
|
+
"require": "./noop/index.cjs",
|
|
174
|
+
"default": "./noop/index.cjs"
|
|
175
|
+
},
|
|
167
176
|
"./simple-string-hash": {
|
|
168
177
|
"types": "./simple-string-hash/index.d.ts",
|
|
169
178
|
"import": {
|