@nr1e/commons 0.0.3-alpha.1 → 0.0.3-alpha.10
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/LICENSE +1 -1
- package/{bitsnbytes → dist/bitsnbytes}/b64.js +14 -21
- package/dist/bitsnbytes/b64.js.map +1 -0
- package/dist/bitsnbytes/index.js +2 -0
- package/dist/bitsnbytes/index.js.map +1 -0
- package/{errors → dist/errors}/errors.d.ts +59 -40
- package/dist/errors/errors.js +230 -0
- package/dist/errors/errors.js.map +1 -0
- package/dist/errors/index.js +2 -0
- package/dist/errors/index.js.map +1 -0
- package/{http → dist/http}/http-method.js +2 -5
- package/dist/http/http-method.js.map +1 -0
- package/{http → dist/http}/http-status-code.js +2 -5
- package/dist/http/http-status-code.js.map +1 -0
- package/dist/http/index.js +3 -0
- package/dist/http/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/{lang → dist/lang}/index.d.ts +1 -0
- package/dist/lang/index.js +3 -0
- package/dist/lang/index.js.map +1 -0
- package/dist/lang/sleep.d.ts +6 -0
- package/dist/lang/sleep.js +9 -0
- package/dist/lang/sleep.js.map +1 -0
- package/dist/lang/type-functions.js +10 -0
- package/dist/lang/type-functions.js.map +1 -0
- package/dist/validator/index.js +2 -0
- package/dist/validator/index.js.map +1 -0
- package/{validator → dist/validator}/validators.js +37 -64
- package/dist/validator/validators.js.map +1 -0
- package/package.json +12 -7
- package/.prettierrc.js +0 -3
- package/bitsnbytes/b64.js.map +0 -1
- package/bitsnbytes/index.js +0 -18
- package/bitsnbytes/index.js.map +0 -1
- package/errors/errors.js +0 -263
- package/errors/errors.js.map +0 -1
- package/errors/index.js +0 -18
- package/errors/index.js.map +0 -1
- package/http/http-method.js.map +0 -1
- package/http/http-status-code.js.map +0 -1
- package/http/index.js +0 -19
- package/http/index.js.map +0 -1
- package/index.d.ts +0 -5
- package/index.js +0 -9
- package/index.js.map +0 -1
- package/jest.config.js +0 -8
- package/lang/index.js +0 -18
- package/lang/index.js.map +0 -1
- package/lang/type-functions.js +0 -16
- package/lang/type-functions.js.map +0 -1
- package/validator/index.js +0 -18
- package/validator/index.js.map +0 -1
- package/validator/validators.js.map +0 -1
- /package/{bitsnbytes → dist/bitsnbytes}/b64.d.ts +0 -0
- /package/{bitsnbytes → dist/bitsnbytes}/index.d.ts +0 -0
- /package/{errors → dist/errors}/index.d.ts +0 -0
- /package/{http → dist/http}/http-method.d.ts +0 -0
- /package/{http → dist/http}/http-status-code.d.ts +0 -0
- /package/{http → dist/http}/index.d.ts +0 -0
- /package/{lang → dist/lang}/type-functions.d.ts +0 -0
- /package/{validator → dist/validator}/index.d.ts +0 -0
- /package/{validator → dist/validator}/validators.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.js","sourceRoot":"./src/","sources":["lang/sleep.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function isObject(item) {
|
|
2
|
+
return (item !== null && typeof item === 'object' && Array.isArray(item) === false);
|
|
3
|
+
}
|
|
4
|
+
export function isString(item) {
|
|
5
|
+
return typeof item === 'string';
|
|
6
|
+
}
|
|
7
|
+
export function isError(item) {
|
|
8
|
+
return item instanceof Error;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=type-functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-functions.js","sourceRoot":"./src/","sources":["lang/type-functions.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,IAAa;IACpC,OAAO,CACL,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAa;IACpC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAa;IACnC,OAAO,IAAI,YAAY,KAAK,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./src/","sources":["validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validString = exports.isValidString = exports.betweenValues = exports.isBetweenValues = exports.maxValue = exports.isMaxValue = exports.minValue = exports.isMinValue = exports.number = exports.isNumber = exports.minLength = exports.isMinLength = exports.maxLength = exports.isMaxLength = exports.email = exports.isEmail = exports.match = exports.isMatch = exports.notBlank = exports.isNotBlank = exports.notEmpty = exports.isNotEmpty = exports.notNull = exports.isNotNull = void 0;
|
|
4
|
-
const errors_1 = require("../errors");
|
|
1
|
+
import { ValidationError } from '../errors';
|
|
5
2
|
/**
|
|
6
3
|
* Tests if a value is null or undefined.
|
|
7
4
|
*
|
|
8
5
|
* @param o the value to check
|
|
9
6
|
*/
|
|
10
|
-
function isNotNull(o) {
|
|
7
|
+
export function isNotNull(o) {
|
|
11
8
|
return o !== undefined && o !== null;
|
|
12
9
|
}
|
|
13
|
-
exports.isNotNull = isNotNull;
|
|
14
10
|
/**
|
|
15
11
|
* Throws a ValidationError if the value is null or undefined.
|
|
16
12
|
* This function also asserts the value to be NonNullable if the check passes.
|
|
@@ -18,21 +14,19 @@ exports.isNotNull = isNotNull;
|
|
|
18
14
|
* @param name the name of the variable
|
|
19
15
|
* @param o the value to check
|
|
20
16
|
*/
|
|
21
|
-
function notNull(name, o) {
|
|
17
|
+
export function notNull(name, o) {
|
|
22
18
|
if (!isNotNull(o)) {
|
|
23
|
-
throw new
|
|
19
|
+
throw new ValidationError(`${name} may not be null or undefined`);
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
|
-
exports.notNull = notNull;
|
|
27
22
|
/**
|
|
28
23
|
* Tests if a value is empty, null, undefined or has a length of 0.
|
|
29
24
|
*
|
|
30
25
|
* @param o the value to check
|
|
31
26
|
*/
|
|
32
|
-
function isNotEmpty(o) {
|
|
27
|
+
export function isNotEmpty(o) {
|
|
33
28
|
return !(o === undefined || o === null || o.toString().length === 0);
|
|
34
29
|
}
|
|
35
|
-
exports.isNotEmpty = isNotEmpty;
|
|
36
30
|
/**
|
|
37
31
|
* Throws a ValidationError if the value is null, undefined or the length is 0.
|
|
38
32
|
* This function also asserts the value to be NonNullable if the check passes.
|
|
@@ -40,21 +34,19 @@ exports.isNotEmpty = isNotEmpty;
|
|
|
40
34
|
* @param name the name of the variable
|
|
41
35
|
* @param o the value to check
|
|
42
36
|
*/
|
|
43
|
-
function notEmpty(name, o) {
|
|
37
|
+
export function notEmpty(name, o) {
|
|
44
38
|
if (!isNotEmpty(o)) {
|
|
45
|
-
throw new
|
|
39
|
+
throw new ValidationError(`${name} may not be empty`);
|
|
46
40
|
}
|
|
47
41
|
}
|
|
48
|
-
exports.notEmpty = notEmpty;
|
|
49
42
|
/**
|
|
50
43
|
* Tests if a value is null, undefined, has a length of 0 or contains only whitespace.
|
|
51
44
|
*
|
|
52
45
|
* @param o the value to check
|
|
53
46
|
*/
|
|
54
|
-
function isNotBlank(o) {
|
|
47
|
+
export function isNotBlank(o) {
|
|
55
48
|
return !(o === undefined || o === null || o.toString().trim().length === 0);
|
|
56
49
|
}
|
|
57
|
-
exports.isNotBlank = isNotBlank;
|
|
58
50
|
/**
|
|
59
51
|
* Throws a ValidationError if the value is null, undefined, has a length of 0 or contains only whitespace.
|
|
60
52
|
* This function also asserts the value to be NonNullable if the check passes.
|
|
@@ -62,12 +54,11 @@ exports.isNotBlank = isNotBlank;
|
|
|
62
54
|
* @param name the name of the variable
|
|
63
55
|
* @param o the value to check
|
|
64
56
|
*/
|
|
65
|
-
function notBlank(name, o) {
|
|
57
|
+
export function notBlank(name, o) {
|
|
66
58
|
if (!isNotBlank(o)) {
|
|
67
|
-
throw new
|
|
59
|
+
throw new ValidationError(`${name} may not be blank`);
|
|
68
60
|
}
|
|
69
61
|
}
|
|
70
|
-
exports.notBlank = notBlank;
|
|
71
62
|
/**
|
|
72
63
|
* Tests if a value does not match the regular expression provided.
|
|
73
64
|
* Undefined and null values are skipped and not tested.
|
|
@@ -75,13 +66,12 @@ exports.notBlank = notBlank;
|
|
|
75
66
|
* @param regex the regular expression to test with
|
|
76
67
|
* @param o the value to check
|
|
77
68
|
*/
|
|
78
|
-
function isMatch(regex, o) {
|
|
69
|
+
export function isMatch(regex, o) {
|
|
79
70
|
if (o === undefined || o === null) {
|
|
80
71
|
return true;
|
|
81
72
|
}
|
|
82
73
|
return o.match(regex) !== null;
|
|
83
74
|
}
|
|
84
|
-
exports.isMatch = isMatch;
|
|
85
75
|
/**
|
|
86
76
|
* Throws a ValidationError if the value matches the regular expression provided.
|
|
87
77
|
* Undefined and null values are skipped and not validated.
|
|
@@ -90,23 +80,21 @@ exports.isMatch = isMatch;
|
|
|
90
80
|
* @param regex the regular expression to validate with
|
|
91
81
|
* @param o the value to check
|
|
92
82
|
*/
|
|
93
|
-
function match(name, regex, o) {
|
|
83
|
+
export function match(name, regex, o) {
|
|
94
84
|
if (!isMatch(regex, o)) {
|
|
95
|
-
throw new
|
|
85
|
+
throw new ValidationError(`${name} must match ${regex}`);
|
|
96
86
|
}
|
|
97
87
|
}
|
|
98
|
-
exports.match = match;
|
|
99
88
|
/**
|
|
100
89
|
* Tests if a value is a valid email address.
|
|
101
90
|
* Undefined and null values are skipped and not validated.
|
|
102
91
|
*
|
|
103
92
|
* @param o the value to check
|
|
104
93
|
*/
|
|
105
|
-
function isEmail(o) {
|
|
94
|
+
export function isEmail(o) {
|
|
106
95
|
const expression = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
|
|
107
96
|
return !(o !== undefined && o !== null && !expression.test(o));
|
|
108
97
|
}
|
|
109
|
-
exports.isEmail = isEmail;
|
|
110
98
|
/**
|
|
111
99
|
* Throws a ValidationError if the value provided is not an email.
|
|
112
100
|
* Undefined and null values are skipped and not validated.
|
|
@@ -114,12 +102,11 @@ exports.isEmail = isEmail;
|
|
|
114
102
|
* @param name the name of the variable
|
|
115
103
|
* @param o the value to check
|
|
116
104
|
*/
|
|
117
|
-
function email(name, o) {
|
|
105
|
+
export function email(name, o) {
|
|
118
106
|
if (!isEmail(o)) {
|
|
119
|
-
throw new
|
|
107
|
+
throw new ValidationError(`${name} is not a valid email address`);
|
|
120
108
|
}
|
|
121
109
|
}
|
|
122
|
-
exports.email = email;
|
|
123
110
|
/**
|
|
124
111
|
* Tests if a value has a length that is less than the provided length.
|
|
125
112
|
* Undefined and null values are skipped and not validated.
|
|
@@ -127,10 +114,9 @@ exports.email = email;
|
|
|
127
114
|
* @param length the maximum length of the variable
|
|
128
115
|
* @param o the value to check
|
|
129
116
|
*/
|
|
130
|
-
function isMaxLength(length, o) {
|
|
117
|
+
export function isMaxLength(length, o) {
|
|
131
118
|
return !(o !== undefined && o !== null && o.length > length);
|
|
132
119
|
}
|
|
133
|
-
exports.isMaxLength = isMaxLength;
|
|
134
120
|
/**
|
|
135
121
|
* Throws a ValidationError if the value provided has a length that exceeds the provided length.
|
|
136
122
|
* Undefined and null values are skipped and not validated.
|
|
@@ -139,12 +125,11 @@ exports.isMaxLength = isMaxLength;
|
|
|
139
125
|
* @param length the maximum length of the variable
|
|
140
126
|
* @param o the value to check
|
|
141
127
|
*/
|
|
142
|
-
function maxLength(name, length, o) {
|
|
128
|
+
export function maxLength(name, length, o) {
|
|
143
129
|
if (!isMaxLength(length, o)) {
|
|
144
|
-
throw new
|
|
130
|
+
throw new ValidationError(`length of ${name} may not exceed ${length}`);
|
|
145
131
|
}
|
|
146
132
|
}
|
|
147
|
-
exports.maxLength = maxLength;
|
|
148
133
|
/**
|
|
149
134
|
* Tests if a value has a length that is greater than the provided length.
|
|
150
135
|
* Undefined and null values are skipped and not validated.
|
|
@@ -152,10 +137,9 @@ exports.maxLength = maxLength;
|
|
|
152
137
|
* @param length the minimum length of the variable
|
|
153
138
|
* @param o the value to check
|
|
154
139
|
*/
|
|
155
|
-
function isMinLength(length, o) {
|
|
140
|
+
export function isMinLength(length, o) {
|
|
156
141
|
return !(o !== undefined && o !== null && o.length < length);
|
|
157
142
|
}
|
|
158
|
-
exports.isMinLength = isMinLength;
|
|
159
143
|
/**
|
|
160
144
|
* Throws a ValidationError if the value provided has a length that is less than the provided length.
|
|
161
145
|
* Undefined and null values are skipped and not validated.
|
|
@@ -164,22 +148,20 @@ exports.isMinLength = isMinLength;
|
|
|
164
148
|
* @param length the minimum length of the variable
|
|
165
149
|
* @param o the value to check
|
|
166
150
|
*/
|
|
167
|
-
function minLength(name, length, o) {
|
|
151
|
+
export function minLength(name, length, o) {
|
|
168
152
|
if (!isMinLength(length, o)) {
|
|
169
|
-
throw new
|
|
153
|
+
throw new ValidationError(`length of ${name} may not be less than ${length}`);
|
|
170
154
|
}
|
|
171
155
|
}
|
|
172
|
-
exports.minLength = minLength;
|
|
173
156
|
/**
|
|
174
157
|
* Tests if a value provided is a number.
|
|
175
158
|
* Undefined and null values are skipped and not validated.
|
|
176
159
|
*
|
|
177
160
|
* @param o the value to check
|
|
178
161
|
*/
|
|
179
|
-
function isNumber(o) {
|
|
162
|
+
export function isNumber(o) {
|
|
180
163
|
return o === undefined || o === null || !isNaN(+o);
|
|
181
164
|
}
|
|
182
|
-
exports.isNumber = isNumber;
|
|
183
165
|
/**
|
|
184
166
|
* Throws a ValidationError if the value provided is not a number.
|
|
185
167
|
* Undefined and null values are skipped and not validated.
|
|
@@ -187,12 +169,11 @@ exports.isNumber = isNumber;
|
|
|
187
169
|
* @param name the name of the variable
|
|
188
170
|
* @param o the value to check
|
|
189
171
|
*/
|
|
190
|
-
function number(name, o) {
|
|
172
|
+
export function number(name, o) {
|
|
191
173
|
if (!isNumber(o)) {
|
|
192
|
-
throw new
|
|
174
|
+
throw new ValidationError(`${name} is not a number`);
|
|
193
175
|
}
|
|
194
176
|
}
|
|
195
|
-
exports.number = number;
|
|
196
177
|
/**
|
|
197
178
|
* Tests if a value is less than the provided minimum value.
|
|
198
179
|
* Undefined and null values are skipped and not validated.
|
|
@@ -200,10 +181,9 @@ exports.number = number;
|
|
|
200
181
|
* @param minValue the minimum value allowed
|
|
201
182
|
* @param o the value to check
|
|
202
183
|
*/
|
|
203
|
-
function isMinValue(minValue, o) {
|
|
184
|
+
export function isMinValue(minValue, o) {
|
|
204
185
|
return o === undefined || o === null || +o >= minValue;
|
|
205
186
|
}
|
|
206
|
-
exports.isMinValue = isMinValue;
|
|
207
187
|
/**
|
|
208
188
|
* Throws a ValidationError if the value is less than the provided minimum value.
|
|
209
189
|
* Undefined and null values are skipped and not validated.
|
|
@@ -212,12 +192,11 @@ exports.isMinValue = isMinValue;
|
|
|
212
192
|
* @param minValue the minimum value allowed
|
|
213
193
|
* @param o the value to check
|
|
214
194
|
*/
|
|
215
|
-
function minValue(name, minValue, o) {
|
|
195
|
+
export function minValue(name, minValue, o) {
|
|
216
196
|
if (!isMinValue(minValue, o)) {
|
|
217
|
-
throw new
|
|
197
|
+
throw new ValidationError(`${name} may not be less than ${minValue}`);
|
|
218
198
|
}
|
|
219
199
|
}
|
|
220
|
-
exports.minValue = minValue;
|
|
221
200
|
/**
|
|
222
201
|
* Tests if a value is more than the provided maximum value.
|
|
223
202
|
* Undefined and null values are skipped and not validated.
|
|
@@ -225,10 +204,9 @@ exports.minValue = minValue;
|
|
|
225
204
|
* @param maxValue the maximum value allowed
|
|
226
205
|
* @param o the value to check
|
|
227
206
|
*/
|
|
228
|
-
function isMaxValue(maxValue, o) {
|
|
207
|
+
export function isMaxValue(maxValue, o) {
|
|
229
208
|
return !(o !== undefined && o !== null && +o > maxValue);
|
|
230
209
|
}
|
|
231
|
-
exports.isMaxValue = isMaxValue;
|
|
232
210
|
/**
|
|
233
211
|
* Throws a ValidationError if the value is more than the provided maximum value.
|
|
234
212
|
* Undefined and null values are skipped and not validated.
|
|
@@ -237,12 +215,11 @@ exports.isMaxValue = isMaxValue;
|
|
|
237
215
|
* @param maxValue the maximum value allowed
|
|
238
216
|
* @param o the value to check
|
|
239
217
|
*/
|
|
240
|
-
function maxValue(name, maxValue, o) {
|
|
218
|
+
export function maxValue(name, maxValue, o) {
|
|
241
219
|
if (!isMaxValue(maxValue, o)) {
|
|
242
|
-
throw new
|
|
220
|
+
throw new ValidationError(`${name} may not be greater than ${maxValue}`);
|
|
243
221
|
}
|
|
244
222
|
}
|
|
245
|
-
exports.maxValue = maxValue;
|
|
246
223
|
/**
|
|
247
224
|
* Tests if the value is between the provided minimum and maximum values inclusive.
|
|
248
225
|
* Undefined and null values are skipped and not validated.
|
|
@@ -251,10 +228,9 @@ exports.maxValue = maxValue;
|
|
|
251
228
|
* @param maxValue the maximum value allowed
|
|
252
229
|
* @param o the value to check
|
|
253
230
|
*/
|
|
254
|
-
function isBetweenValues(minValue, maxValue, o) {
|
|
231
|
+
export function isBetweenValues(minValue, maxValue, o) {
|
|
255
232
|
return !(o !== undefined && o !== null && (+o < minValue || +o > maxValue));
|
|
256
233
|
}
|
|
257
|
-
exports.isBetweenValues = isBetweenValues;
|
|
258
234
|
/**
|
|
259
235
|
* Throws a ValidationError if the value is not between the provided minimum and maximum values inclusive.
|
|
260
236
|
* Undefined and null values are skipped and not validated.
|
|
@@ -264,14 +240,13 @@ exports.isBetweenValues = isBetweenValues;
|
|
|
264
240
|
* @param maxValue the maximum value allowed
|
|
265
241
|
* @param o the value to check
|
|
266
242
|
*/
|
|
267
|
-
function betweenValues(name, minValue, maxValue, o) {
|
|
243
|
+
export function betweenValues(name, minValue, maxValue, o) {
|
|
268
244
|
if (!isBetweenValues(minValue, maxValue, o)) {
|
|
269
|
-
throw new
|
|
245
|
+
throw new ValidationError(`${name} must be between ${minValue} and ${maxValue}`);
|
|
270
246
|
}
|
|
271
247
|
}
|
|
272
|
-
exports.betweenValues = betweenValues;
|
|
273
248
|
const isString = (value) => typeof value === 'string';
|
|
274
|
-
function isValidString(options, value) {
|
|
249
|
+
export function isValidString(options, value) {
|
|
275
250
|
if (options.required) {
|
|
276
251
|
if (!isNotNull(value)) {
|
|
277
252
|
return false;
|
|
@@ -306,8 +281,7 @@ function isValidString(options, value) {
|
|
|
306
281
|
}
|
|
307
282
|
return true;
|
|
308
283
|
}
|
|
309
|
-
|
|
310
|
-
function validString(name, options, value) {
|
|
284
|
+
export function validString(name, options, value) {
|
|
311
285
|
if (options.required) {
|
|
312
286
|
notNull(name, value);
|
|
313
287
|
}
|
|
@@ -315,7 +289,7 @@ function validString(name, options, value) {
|
|
|
315
289
|
return;
|
|
316
290
|
}
|
|
317
291
|
if (!isString(value)) {
|
|
318
|
-
throw new
|
|
292
|
+
throw new ValidationError(`${name} must be a string`);
|
|
319
293
|
}
|
|
320
294
|
options.minLength && minLength(name, options.minLength, value);
|
|
321
295
|
options.maxLength && maxLength(name, options.maxLength, value);
|
|
@@ -325,5 +299,4 @@ function validString(name, options, value) {
|
|
|
325
299
|
options.email && email(name, value);
|
|
326
300
|
options.number && number(name, value);
|
|
327
301
|
}
|
|
328
|
-
exports.validString = validString;
|
|
329
302
|
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"./src/","sources":["validator/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM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AO,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/D,OAAO,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/D,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/commons",
|
|
3
3
|
"description": "Provides common patterns for validation",
|
|
4
|
-
"version": "0.0.3-alpha.
|
|
4
|
+
"version": "0.0.3-alpha.10",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"types": "index.d.ts",
|
|
7
8
|
"author": "NR1E, Inc.",
|
|
@@ -13,6 +14,10 @@
|
|
|
13
14
|
"type": "git",
|
|
14
15
|
"url": "https://github.com/nr1etech/commons-js.git"
|
|
15
16
|
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/nr1etech/commons-js/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/nr1etech/commons-js#readme",
|
|
16
21
|
"files": [
|
|
17
22
|
"/**/*.d.ts",
|
|
18
23
|
"/**/*.js",
|
|
@@ -29,13 +34,13 @@
|
|
|
29
34
|
"typescript": "~5.1.6"
|
|
30
35
|
},
|
|
31
36
|
"exports": {
|
|
32
|
-
".": "./index.js",
|
|
37
|
+
".": "./dist/index.js",
|
|
38
|
+
"./bitsnbytes": "./dist/bitsnbytes/index.js",
|
|
39
|
+
"./errors": "./dist/errors/index.js",
|
|
40
|
+
"./http": "./dist/http/index.js",
|
|
41
|
+
"./lang": "./dist/lang/index.js",
|
|
33
42
|
"./package.json": "./package.json",
|
|
34
|
-
"./
|
|
35
|
-
"./errors": "./errors/index.js",
|
|
36
|
-
"./validator": "./validator/index.js",
|
|
37
|
-
"./lang": "./lang/index.js",
|
|
38
|
-
"./bitsnbytes": "./bitsnbytes/index.js"
|
|
43
|
+
"./validator": "./dist/validator/index.js"
|
|
39
44
|
},
|
|
40
45
|
"scripts": {
|
|
41
46
|
"build": "tsc",
|
package/.prettierrc.js
DELETED
package/bitsnbytes/b64.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"b64.js","sourceRoot":"","sources":["b64.ts"],"names":[],"mappings":";;;AAAA,sCAA+C;AAE/C,sEAAsE;AACtE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,sEAAsE;AACtE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAErB,QAAA,YAAY,GAAe,IAAI,UAAU,CAAC;IACrD,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC5E,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC5E,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,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;gBACtC,IAAI,QAAQ,CAAC,MAAM,KAAK,EAAE,EAAE;oBAC1B,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;iBACzB;gBACD,MAAM;YACR;gBACE,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;gBACtC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;gBAC9B,MAAM;SACT;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAzCD,sBAyCC;AAED;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,GAAe,EAAE,IAAoB;IAC1D,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAFD,wBAEC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,GAAW,EAAE,IAAoB;IACvD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAFD,0BAEC"}
|
package/bitsnbytes/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./b64"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
package/bitsnbytes/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
|