foxts 1.3.1 → 1.4.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.
- package/detect-eol/index.cjs +1 -0
- package/detect-eol/index.d.ts +3 -0
- package/detect-eol/index.mjs +1 -0
- package/is-probably-ip/index.cjs +1 -1
- package/is-probably-ip/index.mjs +1 -1
- package/package.json +49 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.detectEol=function(t){for(let n=0,r=t.length;n<r;n++){const r=t[n];if("\n"===r)break;if("\r"===r&&"\n"===t[n+1])return"\r\n"}return"\n"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){for(let r=0,t=n.length;r<t;r++){const t=n[r];if("\n"===t)break;if("\r"===t&&"\n"===n[r+1])return"\r\n"}return"\n"}export{n as detectEol};
|
package/is-probably-ip/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.isProbablyIpv4=function(t){if(t.length<7||t.length>15)return!1;let e=0;for(let r=0;r<t.length;r+=1){const n=t.charCodeAt(r);if(46===n)e+=1;else if(n<48||n>57)return!1}return 3===e&&46!==t.charCodeAt(0)&&46!==t.charCodeAt(t.length-1)},exports.isProbablyIpv6=function(t){if(t.length<3)return!1;let e=+("["===t[0]),r=t.length;if("]"===t[r-1]&&(r-=1),r-e>39)return!1;let n=!1;for(;e<r;e+=1){const r=t.charCodeAt(e);if(58===r)n=!0;else if(
|
|
1
|
+
"use strict";exports.isProbablyIpv4=function(t){if(t.length<7||t.length>15)return!1;let e=0;for(let r=0;r<t.length;r+=1){const n=t.charCodeAt(r);if(46===n)e+=1;else if(n<48||n>57)return!1}return 3===e&&46!==t.charCodeAt(0)&&46!==t.charCodeAt(t.length-1)},exports.isProbablyIpv6=function(t){if(t.length<3)return!1;let e=+("["===t[0]),r=t.length;if("]"===t[r-1]&&(r-=1),r-e>39)return!1;let n=!1;for(;e<r;e+=1){const r=t.charCodeAt(e);if(58===r)n=!0;else if((r<48||r>57)&&(r<97||r>102)&&(r<65||r>90))return!1}return n};
|
package/is-probably-ip/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){if(e.length<7||e.length>15)return!1;let t=0;for(let r=0;r<e.length;r+=1){const n=e.charCodeAt(r);if(46===n)t+=1;else if(n<48||n>57)return!1}return 3===t&&46!==e.charCodeAt(0)&&46!==e.charCodeAt(e.length-1)}function t(e){if(e.length<3)return!1;let t=+("["===e[0]),r=e.length;if("]"===e[r-1]&&(r-=1),r-t>39)return!1;let n=!1;for(;t<r;t+=1){const r=e.charCodeAt(t);if(58===r)n=!0;else if(
|
|
1
|
+
function e(e){if(e.length<7||e.length>15)return!1;let t=0;for(let r=0;r<e.length;r+=1){const n=e.charCodeAt(r);if(46===n)t+=1;else if(n<48||n>57)return!1}return 3===t&&46!==e.charCodeAt(0)&&46!==e.charCodeAt(e.length-1)}function t(e){if(e.length<3)return!1;let t=+("["===e[0]),r=e.length;if("]"===e[r-1]&&(r-=1),r-t>39)return!1;let n=!1;for(;t<r;t+=1){const r=e.charCodeAt(t);if(58===r)n=!0;else if((r<48||r>57)&&(r<97||r>102)&&(r<65||r>90))return!1}return n}export{e as isProbablyIpv4,t as isProbablyIpv6};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/SukkaW/foxts"
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"require": "./add-array-elements-to-set/index.cjs",
|
|
42
42
|
"default": "./add-array-elements-to-set/index.cjs"
|
|
43
43
|
},
|
|
44
|
-
"./
|
|
45
|
-
"types": "./
|
|
44
|
+
"./append-set-elements-to-array": {
|
|
45
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
46
46
|
"import": {
|
|
47
|
-
"types": "./
|
|
48
|
-
"default": "./
|
|
47
|
+
"types": "./append-set-elements-to-array/index.d.ts",
|
|
48
|
+
"default": "./append-set-elements-to-array/index.mjs"
|
|
49
49
|
},
|
|
50
|
-
"require": "./
|
|
51
|
-
"default": "./
|
|
50
|
+
"require": "./append-set-elements-to-array/index.cjs",
|
|
51
|
+
"default": "./append-set-elements-to-array/index.cjs"
|
|
52
52
|
},
|
|
53
53
|
"./async-write-to-stream": {
|
|
54
54
|
"types": "./async-write-to-stream/index.d.ts",
|
|
@@ -68,15 +68,6 @@
|
|
|
68
68
|
"require": "./bitwise/index.cjs",
|
|
69
69
|
"default": "./bitwise/index.cjs"
|
|
70
70
|
},
|
|
71
|
-
"./append-set-elements-to-array": {
|
|
72
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
73
|
-
"import": {
|
|
74
|
-
"types": "./append-set-elements-to-array/index.d.ts",
|
|
75
|
-
"default": "./append-set-elements-to-array/index.mjs"
|
|
76
|
-
},
|
|
77
|
-
"require": "./append-set-elements-to-array/index.cjs",
|
|
78
|
-
"default": "./append-set-elements-to-array/index.cjs"
|
|
79
|
-
},
|
|
80
71
|
"./create-fixed-array": {
|
|
81
72
|
"types": "./create-fixed-array/index.d.ts",
|
|
82
73
|
"import": {
|
|
@@ -86,6 +77,24 @@
|
|
|
86
77
|
"require": "./create-fixed-array/index.cjs",
|
|
87
78
|
"default": "./create-fixed-array/index.cjs"
|
|
88
79
|
},
|
|
80
|
+
"./detect-eol": {
|
|
81
|
+
"types": "./detect-eol/index.d.ts",
|
|
82
|
+
"import": {
|
|
83
|
+
"types": "./detect-eol/index.d.ts",
|
|
84
|
+
"default": "./detect-eol/index.mjs"
|
|
85
|
+
},
|
|
86
|
+
"require": "./detect-eol/index.cjs",
|
|
87
|
+
"default": "./detect-eol/index.cjs"
|
|
88
|
+
},
|
|
89
|
+
"./ahocorasick": {
|
|
90
|
+
"types": "./ahocorasick/index.d.ts",
|
|
91
|
+
"import": {
|
|
92
|
+
"types": "./ahocorasick/index.d.ts",
|
|
93
|
+
"default": "./ahocorasick/index.mjs"
|
|
94
|
+
},
|
|
95
|
+
"require": "./ahocorasick/index.cjs",
|
|
96
|
+
"default": "./ahocorasick/index.cjs"
|
|
97
|
+
},
|
|
89
98
|
"./escape-string-regexp": {
|
|
90
99
|
"types": "./escape-string-regexp/index.d.ts",
|
|
91
100
|
"import": {
|
|
@@ -95,14 +104,14 @@
|
|
|
95
104
|
"require": "./escape-string-regexp/index.cjs",
|
|
96
105
|
"default": "./escape-string-regexp/index.cjs"
|
|
97
106
|
},
|
|
98
|
-
"./
|
|
99
|
-
"types": "./
|
|
107
|
+
"./fifo": {
|
|
108
|
+
"types": "./fifo/index.d.ts",
|
|
100
109
|
"import": {
|
|
101
|
-
"types": "./
|
|
102
|
-
"default": "./
|
|
110
|
+
"types": "./fifo/index.d.ts",
|
|
111
|
+
"default": "./fifo/index.mjs"
|
|
103
112
|
},
|
|
104
|
-
"require": "./
|
|
105
|
-
"default": "./
|
|
113
|
+
"require": "./fifo/index.cjs",
|
|
114
|
+
"default": "./fifo/index.cjs"
|
|
106
115
|
},
|
|
107
116
|
"./fnv1a": {
|
|
108
117
|
"types": "./fnv1a/index.d.ts",
|
|
@@ -113,15 +122,6 @@
|
|
|
113
122
|
"require": "./fnv1a/index.cjs",
|
|
114
123
|
"default": "./fnv1a/index.cjs"
|
|
115
124
|
},
|
|
116
|
-
"./fifo": {
|
|
117
|
-
"types": "./fifo/index.d.ts",
|
|
118
|
-
"import": {
|
|
119
|
-
"types": "./fifo/index.d.ts",
|
|
120
|
-
"default": "./fifo/index.mjs"
|
|
121
|
-
},
|
|
122
|
-
"require": "./fifo/index.cjs",
|
|
123
|
-
"default": "./fifo/index.cjs"
|
|
124
|
-
},
|
|
125
125
|
"./fnv1a52": {
|
|
126
126
|
"types": "./fnv1a52/index.d.ts",
|
|
127
127
|
"import": {
|
|
@@ -203,15 +203,6 @@
|
|
|
203
203
|
"require": "./pick-random/index.cjs",
|
|
204
204
|
"default": "./pick-random/index.cjs"
|
|
205
205
|
},
|
|
206
|
-
"./repool": {
|
|
207
|
-
"types": "./repool/index.d.ts",
|
|
208
|
-
"import": {
|
|
209
|
-
"types": "./repool/index.d.ts",
|
|
210
|
-
"default": "./repool/index.mjs"
|
|
211
|
-
},
|
|
212
|
-
"require": "./repool/index.cjs",
|
|
213
|
-
"default": "./repool/index.cjs"
|
|
214
|
-
},
|
|
215
206
|
"./random-int": {
|
|
216
207
|
"types": "./random-int/index.d.ts",
|
|
217
208
|
"import": {
|
|
@@ -221,6 +212,15 @@
|
|
|
221
212
|
"require": "./random-int/index.cjs",
|
|
222
213
|
"default": "./random-int/index.cjs"
|
|
223
214
|
},
|
|
215
|
+
"./repool": {
|
|
216
|
+
"types": "./repool/index.d.ts",
|
|
217
|
+
"import": {
|
|
218
|
+
"types": "./repool/index.d.ts",
|
|
219
|
+
"default": "./repool/index.mjs"
|
|
220
|
+
},
|
|
221
|
+
"require": "./repool/index.cjs",
|
|
222
|
+
"default": "./repool/index.cjs"
|
|
223
|
+
},
|
|
224
224
|
"./retrie": {
|
|
225
225
|
"types": "./retrie/index.d.ts",
|
|
226
226
|
"import": {
|
|
@@ -265,6 +265,15 @@
|
|
|
265
265
|
},
|
|
266
266
|
"require": "./wait/index.cjs",
|
|
267
267
|
"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"
|
|
268
277
|
}
|
|
269
278
|
}
|
|
270
279
|
}
|