@bwi-mentorspaces/application-utils-npm 0.0.21 → 0.0.23
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/chat/index.d.ts +0 -3
- package/chat/index.js +0 -3
- package/chat/index.js.map +1 -1
- package/chat/stream/enum/index.d.ts +2 -1
- package/chat/stream/enum/index.js +1 -0
- package/chat/stream/enum/index.js.map +1 -1
- package/chat/stream/models/_/event.data.d.ts +6 -0
- package/chat/stream/stream.api.d.ts +1 -7
- package/chat/stream/stream.api.js +1 -7
- package/chat/stream/stream.api.js.map +1 -1
- package/chat/stream/stream.auth.d.ts +0 -7
- package/chat/stream/stream.auth.js +0 -4
- package/chat/stream/stream.auth.js.map +1 -1
- package/chat/stream/stream.base.d.ts +0 -7
- package/chat/stream/stream.base.js +2 -8
- package/chat/stream/stream.base.js.map +1 -1
- package/chat/stream/stream.channel.d.ts +6 -15
- package/chat/stream/stream.channel.js +12 -13
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +0 -1
- package/chat/stream/stream.error.js +0 -1
- package/chat/stream/stream.error.js.map +1 -1
- package/chat/stream/stream.member.d.ts +0 -6
- package/chat/stream/stream.member.js +0 -6
- package/chat/stream/stream.member.js.map +1 -1
- package/chat/stream/stream.message.d.ts +0 -4
- package/chat/stream/stream.message.js +0 -4
- package/chat/stream/stream.message.js.map +1 -1
- package/chat/stream/stream.user.d.ts +2 -9
- package/chat/stream/stream.user.js +0 -7
- package/chat/stream/stream.user.js.map +1 -1
- package/core/_/api-error.d.ts +0 -1
- package/core/_/api-error.js +0 -1
- package/core/_/api-error.js.map +1 -1
- package/core/_/api-response.d.ts +0 -1
- package/core/_/api-response.js +0 -1
- package/core/_/api-response.js.map +1 -1
- package/core/_/cors-headers.d.ts +0 -1
- package/core/_/cors-headers.js +9 -10
- package/core/_/cors-headers.js.map +1 -1
- package/core/_/service-request.d.ts +0 -2
- package/core/_/service-request.js +5 -7
- package/core/_/service-request.js.map +1 -1
- package/deployment/_/serverless.d.ts +0 -2
- package/deployment/_/serverless.js +0 -2
- package/deployment/_/serverless.js.map +1 -1
- package/endpoint-test-factory/_/test-factory.d.ts +0 -4
- package/endpoint-test-factory/_/test-factory.js +5 -9
- package/endpoint-test-factory/_/test-factory.js.map +1 -1
- package/meet/index.d.ts +0 -3
- package/meet/index.js +0 -3
- package/meet/index.js.map +1 -1
- package/meet/twilio/twilio.api.d.ts +0 -3
- package/meet/twilio/twilio.api.js +0 -3
- package/meet/twilio/twilio.api.js.map +1 -1
- package/meet/twilio/twilio.auth.d.ts +0 -5
- package/meet/twilio/twilio.auth.js +5 -4
- package/meet/twilio/twilio.auth.js.map +1 -1
- package/meet/twilio/twilio.base.d.ts +0 -5
- package/meet/twilio/twilio.base.js +0 -5
- package/meet/twilio/twilio.base.js.map +1 -1
- package/meet/twilio/twilio.room.d.ts +0 -4
- package/meet/twilio/twilio.room.js +0 -4
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +4 -2
- package/swagger/_/swagger.d.ts +0 -2
- package/swagger/_/swagger.js +5 -3
- package/swagger/_/swagger.js.map +1 -1
- package/utils/_/encoder.d.ts +0 -2
- package/utils/_/encoder.js +0 -2
- package/utils/_/encoder.js.map +1 -1
- package/utils/_/encryptor.d.ts +0 -2
- package/utils/_/encryptor.js +7 -9
- package/utils/_/encryptor.js.map +1 -1
- package/utils/_/hasher.d.ts +0 -3
- package/utils/_/hasher.js +5 -4
- package/utils/_/hasher.js.map +1 -1
- package/utils/_/object-mapper.d.ts +0 -1
- package/utils/_/object-mapper.js +0 -1
- package/utils/_/object-mapper.js.map +1 -1
- package/utils/_/string-formatter.d.ts +0 -4
- package/utils/_/string-formatter.js +0 -4
- package/utils/_/string-formatter.js.map +1 -1
- package/utils/_/utc-date.d.ts +0 -4
- package/utils/_/utc-date.js +8 -12
- package/utils/_/utc-date.js.map +1 -1
- package/validators/_/checker.d.ts +0 -7
- package/validators/_/checker.js +1 -7
- package/validators/_/checker.js.map +1 -1
- package/validators/_/regex.d.ts +0 -15
- package/validators/_/regex.js +0 -15
- package/validators/_/regex.js.map +1 -1
|
@@ -7,7 +7,6 @@ exports.StringFormatter = void 0;
|
|
|
7
7
|
class StringFormatter {
|
|
8
8
|
/**
|
|
9
9
|
* Convert first char to lower case
|
|
10
|
-
*
|
|
11
10
|
* @param {string} value value to be converted
|
|
12
11
|
* @returns {string} converted value
|
|
13
12
|
*/
|
|
@@ -16,7 +15,6 @@ class StringFormatter {
|
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Convert first char to upper case
|
|
19
|
-
*
|
|
20
18
|
* @param {string} value value to be converted
|
|
21
19
|
* @returns {string} converted value
|
|
22
20
|
*/
|
|
@@ -25,7 +23,6 @@ class StringFormatter {
|
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
27
25
|
* Capitalize all words on sentence
|
|
28
|
-
*
|
|
29
26
|
* @param {string} value value to be converted
|
|
30
27
|
* @returns {string} converted value
|
|
31
28
|
*/
|
|
@@ -34,7 +31,6 @@ class StringFormatter {
|
|
|
34
31
|
}
|
|
35
32
|
/**
|
|
36
33
|
* Function that put quotes to params for stored procedure
|
|
37
|
-
*
|
|
38
34
|
* @param {string} text text to add quote
|
|
39
35
|
* @param {boolean} removeComma remove final comma if is a concat of values
|
|
40
36
|
* @returns {string} return formatted string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-formatter.js","sourceRoot":"","sources":["../../../utils/_/string-formatter.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,eAAe;IACjC
|
|
1
|
+
{"version":3,"file":"string-formatter.js","sourceRoot":"","sources":["../../../utils/_/string-formatter.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,eAAe;IACjC;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,cAAuB,KAAK;QACtD,IAAI,WAAW;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;;YACtD,OAAO,IAAI,IAAI,GAAG,CAAC;IAC5B,CAAC;CACJ;AAtCD,0CAsCC"}
|
package/utils/_/utc-date.d.ts
CHANGED
|
@@ -5,27 +5,23 @@ import { Interval } from "../../enums";
|
|
|
5
5
|
export declare abstract class UtcDate {
|
|
6
6
|
/**
|
|
7
7
|
* Get Utc Date Time from date value
|
|
8
|
-
*
|
|
9
8
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
10
9
|
* @returns {Date} Utc Date Time
|
|
11
10
|
*/
|
|
12
11
|
static convert(dtm: string | number): Date;
|
|
13
12
|
/**
|
|
14
13
|
* Get current Utc Date Time
|
|
15
|
-
*
|
|
16
14
|
* @returns {Date} Current Utc Date Time
|
|
17
15
|
*/
|
|
18
16
|
static now(): Date;
|
|
19
17
|
/**
|
|
20
18
|
* Get current Utc Date Time as a Timestamp
|
|
21
|
-
*
|
|
22
19
|
* @param {number?} min optional number of min to add to the current datetime
|
|
23
20
|
* @returns {number} Utc Timestamp
|
|
24
21
|
*/
|
|
25
22
|
static timestamp(min?: number): number;
|
|
26
23
|
/**
|
|
27
24
|
* Add or subtract days to specific date
|
|
28
|
-
*
|
|
29
25
|
* @param {Date} date date to start with
|
|
30
26
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
31
27
|
* @param {number} units number of units of given interval to add
|
package/utils/_/utc-date.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.UtcDate = void 0;
|
|
|
7
7
|
class UtcDate {
|
|
8
8
|
/**
|
|
9
9
|
* Get Utc Date Time from date value
|
|
10
|
-
*
|
|
11
10
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
12
11
|
* @returns {Date} Utc Date Time
|
|
13
12
|
*/
|
|
@@ -16,7 +15,6 @@ class UtcDate {
|
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Get current Utc Date Time
|
|
19
|
-
*
|
|
20
18
|
* @returns {Date} Current Utc Date Time
|
|
21
19
|
*/
|
|
22
20
|
static now() {
|
|
@@ -24,7 +22,6 @@ class UtcDate {
|
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
26
24
|
* Get current Utc Date Time as a Timestamp
|
|
27
|
-
*
|
|
28
25
|
* @param {number?} min optional number of min to add to the current datetime
|
|
29
26
|
* @returns {number} Utc Timestamp
|
|
30
27
|
*/
|
|
@@ -39,7 +36,6 @@ class UtcDate {
|
|
|
39
36
|
}
|
|
40
37
|
/**
|
|
41
38
|
* Add or subtract days to specific date
|
|
42
|
-
*
|
|
43
39
|
* @param {Date} date date to start with
|
|
44
40
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
45
41
|
* @param {number} units number of units of given interval to add
|
|
@@ -50,28 +46,28 @@ class UtcDate {
|
|
|
50
46
|
return undefined;
|
|
51
47
|
let newDate;
|
|
52
48
|
switch (interval) {
|
|
53
|
-
case "year" /* Year */:
|
|
49
|
+
case "year" /* Interval.Year */:
|
|
54
50
|
newDate = new Date(date.setFullYear(date.getFullYear() + units));
|
|
55
51
|
break;
|
|
56
|
-
case "quarter" /* Quarter */:
|
|
52
|
+
case "quarter" /* Interval.Quarter */:
|
|
57
53
|
newDate = new Date(date.setMonth(date.getMonth() + 3 * units));
|
|
58
54
|
break;
|
|
59
|
-
case "month" /* Month */:
|
|
55
|
+
case "month" /* Interval.Month */:
|
|
60
56
|
newDate = new Date(date.setMonth(date.getMonth() + units));
|
|
61
57
|
break;
|
|
62
|
-
case "week" /* Week */:
|
|
58
|
+
case "week" /* Interval.Week */:
|
|
63
59
|
newDate = new Date(date.setDate(date.getDate() + 7 * units));
|
|
64
60
|
break;
|
|
65
|
-
case "day" /* Day */:
|
|
61
|
+
case "day" /* Interval.Day */:
|
|
66
62
|
newDate = new Date(date.setDate(date.getDate() + units));
|
|
67
63
|
break;
|
|
68
|
-
case "hour" /* Hour */:
|
|
64
|
+
case "hour" /* Interval.Hour */:
|
|
69
65
|
newDate = new Date(date.setTime(date.getTime() + units * 3600000));
|
|
70
66
|
break;
|
|
71
|
-
case "minute" /* Minute */:
|
|
67
|
+
case "minute" /* Interval.Minute */:
|
|
72
68
|
newDate = new Date(date.setTime(date.getTime() + units * 60000));
|
|
73
69
|
break;
|
|
74
|
-
case "second" /* Second */:
|
|
70
|
+
case "second" /* Interval.Second */:
|
|
75
71
|
newDate = new Date(date.setTime(date.getTime() + units * 1000));
|
|
76
72
|
break;
|
|
77
73
|
default:
|
package/utils/_/utc-date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utc-date.js","sourceRoot":"","sources":["../../../utils/_/utc-date.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB
|
|
1
|
+
{"version":3,"file":"utc-date.js","sourceRoot":"","sources":["../../../utils/_/utc-date.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAsB,OAAO;IACzB;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,GAAoB;QAC/B,OAAO,IAAI,IAAI,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AAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;gBAC7D,MAAM;YACV;gBACI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;gBACzD,MAAM;YACV;gBACI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;gBACnE,MAAM;YACV;gBACI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;gBACjE,MAAM;YACV;gBACI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChE,MAAM;YACV;gBACI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBACjD,MAAM;SACb;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAzED,0BAyEC"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
export declare abstract class Checker {
|
|
5
5
|
/**
|
|
6
6
|
* Method to match value against the Regular Expression
|
|
7
|
-
*
|
|
8
7
|
* @param {RegExp} regex regular expression to match the value format
|
|
9
8
|
* @param {string} value value to match
|
|
10
9
|
* @returns {boolean} is matched
|
|
@@ -12,14 +11,12 @@ export declare abstract class Checker {
|
|
|
12
11
|
static isMatch(regex: RegExp, value: string): boolean;
|
|
13
12
|
/**
|
|
14
13
|
* Method to check if value is null or empty
|
|
15
|
-
*
|
|
16
14
|
* @param {string | undefined | null} value a value to validate
|
|
17
15
|
* @returns {boolean} is null or empty
|
|
18
16
|
*/
|
|
19
17
|
static isNullOrEmpty(value: string | undefined | null): boolean;
|
|
20
18
|
/**
|
|
21
19
|
* Method to check if the number is modular (returns 0)
|
|
22
|
-
*
|
|
23
20
|
* @param {number} mod mod factor
|
|
24
21
|
* @param {number} value number to run mod function on
|
|
25
22
|
* @returns {boolean} is modular number
|
|
@@ -27,7 +24,6 @@ export declare abstract class Checker {
|
|
|
27
24
|
static isModularBy(mod: number, value: number): boolean;
|
|
28
25
|
/**
|
|
29
26
|
* Method to check min length of a value
|
|
30
|
-
*
|
|
31
27
|
* @param {number} length min length
|
|
32
28
|
* @param {string} value value to check
|
|
33
29
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -35,7 +31,6 @@ export declare abstract class Checker {
|
|
|
35
31
|
static hasMinLength(length: number, value: string): boolean;
|
|
36
32
|
/**
|
|
37
33
|
* Method to check max length of a value
|
|
38
|
-
*
|
|
39
34
|
* @param {number} length max length
|
|
40
35
|
* @param {string} value value to check
|
|
41
36
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -43,7 +38,6 @@ export declare abstract class Checker {
|
|
|
43
38
|
static hasMaxLength(length: number, value: string): boolean;
|
|
44
39
|
/**
|
|
45
40
|
* Method to check exact length of a value
|
|
46
|
-
*
|
|
47
41
|
* @param {number} length exact length
|
|
48
42
|
* @param {string} value value to check
|
|
49
43
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -51,7 +45,6 @@ export declare abstract class Checker {
|
|
|
51
45
|
static hasExactLength(length: number, value: string): boolean;
|
|
52
46
|
/**
|
|
53
47
|
* Check a specific name or string
|
|
54
|
-
*
|
|
55
48
|
* @param {number} min minimum length
|
|
56
49
|
* @param {number} max maximum length
|
|
57
50
|
* @param {string} value string value to check
|
package/validators/_/checker.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.Checker = void 0;
|
|
|
7
7
|
class Checker {
|
|
8
8
|
/**
|
|
9
9
|
* Method to match value against the Regular Expression
|
|
10
|
-
*
|
|
11
10
|
* @param {RegExp} regex regular expression to match the value format
|
|
12
11
|
* @param {string} value value to match
|
|
13
12
|
* @returns {boolean} is matched
|
|
@@ -17,7 +16,6 @@ class Checker {
|
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* Method to check if value is null or empty
|
|
20
|
-
*
|
|
21
19
|
* @param {string | undefined | null} value a value to validate
|
|
22
20
|
* @returns {boolean} is null or empty
|
|
23
21
|
*/
|
|
@@ -32,7 +30,6 @@ class Checker {
|
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
34
32
|
* Method to check if the number is modular (returns 0)
|
|
35
|
-
*
|
|
36
33
|
* @param {number} mod mod factor
|
|
37
34
|
* @param {number} value number to run mod function on
|
|
38
35
|
* @returns {boolean} is modular number
|
|
@@ -42,7 +39,6 @@ class Checker {
|
|
|
42
39
|
}
|
|
43
40
|
/**
|
|
44
41
|
* Method to check min length of a value
|
|
45
|
-
*
|
|
46
42
|
* @param {number} length min length
|
|
47
43
|
* @param {string} value value to check
|
|
48
44
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -52,7 +48,6 @@ class Checker {
|
|
|
52
48
|
}
|
|
53
49
|
/**
|
|
54
50
|
* Method to check max length of a value
|
|
55
|
-
*
|
|
56
51
|
* @param {number} length max length
|
|
57
52
|
* @param {string} value value to check
|
|
58
53
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -62,7 +57,6 @@ class Checker {
|
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Method to check exact length of a value
|
|
65
|
-
*
|
|
66
60
|
* @param {number} length exact length
|
|
67
61
|
* @param {string} value value to check
|
|
68
62
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -72,7 +66,6 @@ class Checker {
|
|
|
72
66
|
}
|
|
73
67
|
/**
|
|
74
68
|
* Check a specific name or string
|
|
75
|
-
*
|
|
76
69
|
* @param {number} min minimum length
|
|
77
70
|
* @param {number} max maximum length
|
|
78
71
|
* @param {string} value string value to check
|
|
@@ -93,6 +86,7 @@ class Checker {
|
|
|
93
86
|
//return the result.
|
|
94
87
|
return minLength && maxLength;
|
|
95
88
|
}
|
|
89
|
+
return false;
|
|
96
90
|
}
|
|
97
91
|
}
|
|
98
92
|
exports.Checker = Checker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.js","sourceRoot":"","sources":["../../../validators/_/checker.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,OAAO;IACzB
|
|
1
|
+
{"version":3,"file":"checker.js","sourceRoot":"","sources":["../../../validators/_/checker.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,OAAO;IACzB;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,KAAa,EAAE,KAAa;QACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,KAAgC;QACjD,IAAI,KAAK,KAAK,SAAS,EAAE;YACrB,OAAO,IAAI,CAAC;SACf;QAED,IAAI,KAAK,KAAK,IAAI,EAAE;YAChB,OAAO,IAAI,CAAC;SACf;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,KAAa;QACzC,OAAO,KAAK,GAAG,GAAG,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,MAAc,EAAE,KAAa;QAC7C,OAAO,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,MAAc,EAAE,KAAa;QAC7C,OAAO,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,MAAc,EAAE,KAAa;QAC/C,OAAO,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa,EAAE,aAAsB,IAAI;QACpF,IAAI,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;YAC5C,OAAO,KAAK,CAAC;SAChB;QACD,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;YAC7C,OAAO,IAAI,CAAC;SACf;QACD,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;YAC/B,cAAc;YACd,MAAM,SAAS,GAAY,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,SAAS,GAAY,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAE5D,oBAAoB;YACpB,OAAO,SAAS,IAAI,SAAS,CAAC;SACjC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA7FD,0BA6FC"}
|
package/validators/_/regex.d.ts
CHANGED
|
@@ -4,93 +4,78 @@
|
|
|
4
4
|
export declare abstract class Regex {
|
|
5
5
|
/**
|
|
6
6
|
* Method that provides regular expression for alphabetic character validation
|
|
7
|
-
*
|
|
8
7
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
9
8
|
* @returns {RegExp} regular expression
|
|
10
9
|
*/
|
|
11
10
|
static alpha(includeSpaces: boolean): RegExp;
|
|
12
11
|
/**
|
|
13
12
|
* Method that provides regular express for alpha-numeric character validation
|
|
14
|
-
*
|
|
15
13
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
16
14
|
* @returns {RegExp} regular expression
|
|
17
15
|
*/
|
|
18
16
|
static alphaNumeric(includeSpaces: boolean): RegExp;
|
|
19
17
|
/**
|
|
20
18
|
* Method that provides regular expression for numeric character validation
|
|
21
|
-
*
|
|
22
19
|
* @returns {RegExp} regular expression
|
|
23
20
|
*/
|
|
24
21
|
static numeric(): RegExp;
|
|
25
22
|
/**
|
|
26
23
|
* Method that provides regular expression for a value that contains a number validation
|
|
27
|
-
*
|
|
28
24
|
* @returns {RegExp} regular expression
|
|
29
25
|
*/
|
|
30
26
|
static hasNumber(): RegExp;
|
|
31
27
|
/**
|
|
32
28
|
* Method that provides regular expression for a value that contains special characters validation
|
|
33
|
-
*
|
|
34
29
|
* @returns {RegExp} regular expression
|
|
35
30
|
*/
|
|
36
31
|
static hasSpecialCharacter(): RegExp;
|
|
37
32
|
/**
|
|
38
33
|
* Method that provides regular expression for a value that is all upper case validation
|
|
39
|
-
*
|
|
40
34
|
* @returns {RegExp} regular expression
|
|
41
35
|
*/
|
|
42
36
|
static isAllUpperCase(): RegExp;
|
|
43
37
|
/**
|
|
44
38
|
* Method that provides regular expression for a value that contains upper case validation
|
|
45
|
-
*
|
|
46
39
|
* @returns {RegExp} regular expression
|
|
47
40
|
*/
|
|
48
41
|
static hasUpperCase(): RegExp;
|
|
49
42
|
/**
|
|
50
43
|
* Method that provides regular expression for a value that is all lower case validation
|
|
51
|
-
*
|
|
52
44
|
* @returns {RegExp} regular expression
|
|
53
45
|
*/
|
|
54
46
|
static isAllLowerCase(): RegExp;
|
|
55
47
|
/**
|
|
56
48
|
* Method that provides regular expression for a value that contains lower case validation
|
|
57
|
-
*
|
|
58
49
|
* @returns {RegExp} regular expression
|
|
59
50
|
*/
|
|
60
51
|
static hasLowerCase(): RegExp;
|
|
61
52
|
/**
|
|
62
53
|
* Method that provides regular expression for email address validation
|
|
63
|
-
*
|
|
64
54
|
* @returns {RegExp} regular expression
|
|
65
55
|
*/
|
|
66
56
|
static emailAddress(): RegExp;
|
|
67
57
|
/**
|
|
68
58
|
* Method that provides regular expression for a phone number validation (USA)
|
|
69
|
-
*
|
|
70
59
|
* @returns {RegExp} regular expression
|
|
71
60
|
*/
|
|
72
61
|
static phoneNumber(): RegExp;
|
|
73
62
|
/**
|
|
74
63
|
* Method that provides regular expression for a street validation
|
|
75
|
-
*
|
|
76
64
|
* @returns {RegExp} regular expression
|
|
77
65
|
*/
|
|
78
66
|
static street(): RegExp;
|
|
79
67
|
/**
|
|
80
68
|
* Method that provides regular expression for a time validation
|
|
81
|
-
*
|
|
82
69
|
* @returns {RegExp} regular expression
|
|
83
70
|
*/
|
|
84
71
|
static time(): RegExp;
|
|
85
72
|
/**
|
|
86
73
|
* Method that provides regular expression for a URL validation
|
|
87
|
-
*
|
|
88
74
|
* @returns {RegExp} regular expression
|
|
89
75
|
*/
|
|
90
76
|
static url(): RegExp;
|
|
91
77
|
/**
|
|
92
78
|
* Method that provides regular expression for a social media link validation
|
|
93
|
-
*
|
|
94
79
|
* @param {string} social name of the social media
|
|
95
80
|
* @returns {RegExp} regular expression
|
|
96
81
|
*/
|
package/validators/_/regex.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.Regex = void 0;
|
|
|
7
7
|
class Regex {
|
|
8
8
|
/**
|
|
9
9
|
* Method that provides regular expression for alphabetic character validation
|
|
10
|
-
*
|
|
11
10
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
12
11
|
* @returns {RegExp} regular expression
|
|
13
12
|
*/
|
|
@@ -21,7 +20,6 @@ class Regex {
|
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
22
|
* Method that provides regular express for alpha-numeric character validation
|
|
24
|
-
*
|
|
25
23
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
26
24
|
* @returns {RegExp} regular expression
|
|
27
25
|
*/
|
|
@@ -35,7 +33,6 @@ class Regex {
|
|
|
35
33
|
}
|
|
36
34
|
/**
|
|
37
35
|
* Method that provides regular expression for numeric character validation
|
|
38
|
-
*
|
|
39
36
|
* @returns {RegExp} regular expression
|
|
40
37
|
*/
|
|
41
38
|
static numeric() {
|
|
@@ -43,7 +40,6 @@ class Regex {
|
|
|
43
40
|
}
|
|
44
41
|
/**
|
|
45
42
|
* Method that provides regular expression for a value that contains a number validation
|
|
46
|
-
*
|
|
47
43
|
* @returns {RegExp} regular expression
|
|
48
44
|
*/
|
|
49
45
|
static hasNumber() {
|
|
@@ -51,7 +47,6 @@ class Regex {
|
|
|
51
47
|
}
|
|
52
48
|
/**
|
|
53
49
|
* Method that provides regular expression for a value that contains special characters validation
|
|
54
|
-
*
|
|
55
50
|
* @returns {RegExp} regular expression
|
|
56
51
|
*/
|
|
57
52
|
static hasSpecialCharacter() {
|
|
@@ -59,7 +54,6 @@ class Regex {
|
|
|
59
54
|
}
|
|
60
55
|
/**
|
|
61
56
|
* Method that provides regular expression for a value that is all upper case validation
|
|
62
|
-
*
|
|
63
57
|
* @returns {RegExp} regular expression
|
|
64
58
|
*/
|
|
65
59
|
static isAllUpperCase() {
|
|
@@ -67,7 +61,6 @@ class Regex {
|
|
|
67
61
|
}
|
|
68
62
|
/**
|
|
69
63
|
* Method that provides regular expression for a value that contains upper case validation
|
|
70
|
-
*
|
|
71
64
|
* @returns {RegExp} regular expression
|
|
72
65
|
*/
|
|
73
66
|
static hasUpperCase() {
|
|
@@ -75,7 +68,6 @@ class Regex {
|
|
|
75
68
|
}
|
|
76
69
|
/**
|
|
77
70
|
* Method that provides regular expression for a value that is all lower case validation
|
|
78
|
-
*
|
|
79
71
|
* @returns {RegExp} regular expression
|
|
80
72
|
*/
|
|
81
73
|
static isAllLowerCase() {
|
|
@@ -83,7 +75,6 @@ class Regex {
|
|
|
83
75
|
}
|
|
84
76
|
/**
|
|
85
77
|
* Method that provides regular expression for a value that contains lower case validation
|
|
86
|
-
*
|
|
87
78
|
* @returns {RegExp} regular expression
|
|
88
79
|
*/
|
|
89
80
|
static hasLowerCase() {
|
|
@@ -91,7 +82,6 @@ class Regex {
|
|
|
91
82
|
}
|
|
92
83
|
/**
|
|
93
84
|
* Method that provides regular expression for email address validation
|
|
94
|
-
*
|
|
95
85
|
* @returns {RegExp} regular expression
|
|
96
86
|
*/
|
|
97
87
|
static emailAddress() {
|
|
@@ -99,7 +89,6 @@ class Regex {
|
|
|
99
89
|
}
|
|
100
90
|
/**
|
|
101
91
|
* Method that provides regular expression for a phone number validation (USA)
|
|
102
|
-
*
|
|
103
92
|
* @returns {RegExp} regular expression
|
|
104
93
|
*/
|
|
105
94
|
static phoneNumber() {
|
|
@@ -107,7 +96,6 @@ class Regex {
|
|
|
107
96
|
}
|
|
108
97
|
/**
|
|
109
98
|
* Method that provides regular expression for a street validation
|
|
110
|
-
*
|
|
111
99
|
* @returns {RegExp} regular expression
|
|
112
100
|
*/
|
|
113
101
|
static street() {
|
|
@@ -115,7 +103,6 @@ class Regex {
|
|
|
115
103
|
}
|
|
116
104
|
/**
|
|
117
105
|
* Method that provides regular expression for a time validation
|
|
118
|
-
*
|
|
119
106
|
* @returns {RegExp} regular expression
|
|
120
107
|
*/
|
|
121
108
|
static time() {
|
|
@@ -123,7 +110,6 @@ class Regex {
|
|
|
123
110
|
}
|
|
124
111
|
/**
|
|
125
112
|
* Method that provides regular expression for a URL validation
|
|
126
|
-
*
|
|
127
113
|
* @returns {RegExp} regular expression
|
|
128
114
|
*/
|
|
129
115
|
static url() {
|
|
@@ -131,7 +117,6 @@ class Regex {
|
|
|
131
117
|
}
|
|
132
118
|
/**
|
|
133
119
|
* Method that provides regular expression for a social media link validation
|
|
134
|
-
*
|
|
135
120
|
* @param {string} social name of the social media
|
|
136
121
|
* @returns {RegExp} regular expression
|
|
137
122
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../validators/_/regex.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAsB,KAAK;IACvB
|
|
1
|
+
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../validators/_/regex.ts"],"names":[],"mappings":";;;AAAA;;GA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