foxts 1.1.0 → 1.1.2
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/package.json +28 -28
- package/retrie/index.cjs +1 -1
- package/retrie/index.d.ts +2 -1
- package/retrie/index.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/SukkaW/foxts"
|
|
@@ -101,15 +101,6 @@
|
|
|
101
101
|
"require": "./fifo/index.cjs",
|
|
102
102
|
"default": "./fifo/index.cjs"
|
|
103
103
|
},
|
|
104
|
-
"./fnv1a": {
|
|
105
|
-
"types": "./fnv1a/index.d.ts",
|
|
106
|
-
"import": {
|
|
107
|
-
"types": "./fnv1a/index.d.ts",
|
|
108
|
-
"default": "./fnv1a/index.mjs"
|
|
109
|
-
},
|
|
110
|
-
"require": "./fnv1a/index.cjs",
|
|
111
|
-
"default": "./fnv1a/index.cjs"
|
|
112
|
-
},
|
|
113
104
|
"./fnv1a52": {
|
|
114
105
|
"types": "./fnv1a52/index.d.ts",
|
|
115
106
|
"import": {
|
|
@@ -119,6 +110,15 @@
|
|
|
119
110
|
"require": "./fnv1a52/index.cjs",
|
|
120
111
|
"default": "./fnv1a52/index.cjs"
|
|
121
112
|
},
|
|
113
|
+
"./fnv1a": {
|
|
114
|
+
"types": "./fnv1a/index.d.ts",
|
|
115
|
+
"import": {
|
|
116
|
+
"types": "./fnv1a/index.d.ts",
|
|
117
|
+
"default": "./fnv1a/index.mjs"
|
|
118
|
+
},
|
|
119
|
+
"require": "./fnv1a/index.cjs",
|
|
120
|
+
"default": "./fnv1a/index.cjs"
|
|
121
|
+
},
|
|
122
122
|
"./guard": {
|
|
123
123
|
"types": "./guard/index.d.ts",
|
|
124
124
|
"import": {
|
|
@@ -146,15 +146,6 @@
|
|
|
146
146
|
"require": "./identity/index.cjs",
|
|
147
147
|
"default": "./identity/index.cjs"
|
|
148
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
|
-
},
|
|
158
149
|
"./is-probably-ip": {
|
|
159
150
|
"types": "./is-probably-ip/index.d.ts",
|
|
160
151
|
"import": {
|
|
@@ -164,6 +155,15 @@
|
|
|
164
155
|
"require": "./is-probably-ip/index.cjs",
|
|
165
156
|
"default": "./is-probably-ip/index.cjs"
|
|
166
157
|
},
|
|
158
|
+
"./merge-headers": {
|
|
159
|
+
"types": "./merge-headers/index.d.ts",
|
|
160
|
+
"import": {
|
|
161
|
+
"types": "./merge-headers/index.d.ts",
|
|
162
|
+
"default": "./merge-headers/index.mjs"
|
|
163
|
+
},
|
|
164
|
+
"require": "./merge-headers/index.cjs",
|
|
165
|
+
"default": "./merge-headers/index.cjs"
|
|
166
|
+
},
|
|
167
167
|
"./noop": {
|
|
168
168
|
"types": "./noop/index.d.ts",
|
|
169
169
|
"import": {
|
|
@@ -200,6 +200,15 @@
|
|
|
200
200
|
"require": "./serialized-memo/index.cjs",
|
|
201
201
|
"default": "./serialized-memo/index.cjs"
|
|
202
202
|
},
|
|
203
|
+
"./tagged": {
|
|
204
|
+
"types": "./tagged/index.d.ts",
|
|
205
|
+
"import": {
|
|
206
|
+
"types": "./tagged/index.d.ts",
|
|
207
|
+
"default": "./tagged/index.mjs"
|
|
208
|
+
},
|
|
209
|
+
"require": "./tagged/index.cjs",
|
|
210
|
+
"default": "./tagged/index.cjs"
|
|
211
|
+
},
|
|
203
212
|
"./simple-string-hash": {
|
|
204
213
|
"types": "./simple-string-hash/index.d.ts",
|
|
205
214
|
"import": {
|
|
@@ -217,15 +226,6 @@
|
|
|
217
226
|
},
|
|
218
227
|
"require": "./wait/index.cjs",
|
|
219
228
|
"default": "./wait/index.cjs"
|
|
220
|
-
},
|
|
221
|
-
"./tagged": {
|
|
222
|
-
"types": "./tagged/index.d.ts",
|
|
223
|
-
"import": {
|
|
224
|
-
"types": "./tagged/index.d.ts",
|
|
225
|
-
"default": "./tagged/index.mjs"
|
|
226
|
-
},
|
|
227
|
-
"require": "./tagged/index.cjs",
|
|
228
|
-
"default": "./tagged/index.cjs"
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
}
|
package/retrie/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=new Set([".","?","*","+","^","$","|","(",")","{","[","\\"]);
|
|
1
|
+
"use strict";const t=new Set([".","?","*","+","^","$","|","(",")","{","[","\\"]);function e(n,o=!1){const r={},i=(t,e)=>{let n;let o=r;for(let r=0,i=t.length;r<i;++r)(n=t.charAt(r))in o||(o[n]=e?{"":""}:{}),o=o[n];e&&(o[""]="")};for(let t=0,e=n.length;t<e;++t)i(n[t],o);const s=()=>(function e(n){let o,r,i=!1,s=!1;const c=[],l=[];for(const o in n){if(!o){i=!0;continue}((r=e(n[o]))?c:l).push(("-"===o?"\\x2d":t.has(o)?"\\"+o:o)+r)}return i&&null==r?"":(s=!c.length,l.length&&c.push(l[1]?"["+l.join("")+"]":l[0]),o=c[1]?"(?:"+c.join("|")+")":c[0],i&&(o=s?o+"?":"(?:"+o+")?"),o||"")})(r);return{add:i,toString:s,toRe:()=>new RegExp((o?"^":"")+s())}}exports.createRetrieKeywordFilter=function(t,n=!1){const o=e(t,n).toRe();return o.test.bind(o)},exports.retrie=e;
|
package/retrie/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ declare function retrie(keywords: ArrayLike<string>, asPrefixes?: boolean): {
|
|
|
3
3
|
toString: () => string;
|
|
4
4
|
toRe: () => RegExp;
|
|
5
5
|
};
|
|
6
|
+
declare function createRetrieKeywordFilter(keywords: ArrayLike<string>, asPrefixes?: boolean): (string: string) => boolean;
|
|
6
7
|
|
|
7
|
-
export { retrie };
|
|
8
|
+
export { createRetrieKeywordFilter, retrie };
|
package/retrie/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=new Set([".","?","*","+","^","$","|","(",")","{","[","\\"]);function e(n,o=!1){const r={},i=(t,e)=>{let n;let o=r;for(let r=0,i=t.length;r<i;++r)(n=t.charAt(r))in o||(o[n]=e?{"":""}:{}),o=o[n];e&&(o[""]="")};for(let t=0,e=n.length;t<e;++t)i(n[t],o);const c=()=>(function e(n){let o,r,i=!1,c=!1;const l=[],s=[];for(const o in n){if(!o){i=!0;continue}((r=e(n[o]))?l:s).push(("-"===o?"\\x2d":t.has(o)?"\\"+o:o)+r)}return i&&null==r?"":(c=!l.length,s.length&&l.push(s[1]?"["+s.join("")+"]":s[0]),o=l[1]?"(?:"+l.join("|")+")":l[0],i&&(o=c?o+"?":"(?:"+o+")?"),o||"")})(r);return{add:i,toString:c,toRe:()=>new RegExp((o?"^":"")+c())}}function n(t,o=!1){const r=e(t,o).toRe();return r.test.bind(r)}export{n as createRetrieKeywordFilter,e as retrie};
|