@bwi-mentorspaces/application-utils-npm 0.0.24 → 0.0.26
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 +3 -0
- package/chat/index.js +3 -0
- package/chat/index.js.map +1 -1
- package/chat/stream/enum/index.d.ts +1 -0
- 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 +9 -1
- package/chat/stream/stream.api.d.ts +6 -0
- package/chat/stream/stream.api.js +6 -0
- package/chat/stream/stream.api.js.map +1 -1
- package/chat/stream/stream.auth.d.ts +7 -0
- package/chat/stream/stream.auth.js +4 -0
- package/chat/stream/stream.auth.js.map +1 -1
- package/chat/stream/stream.base.d.ts +7 -0
- package/chat/stream/stream.base.js +8 -1
- package/chat/stream/stream.base.js.map +1 -1
- package/chat/stream/stream.channel.d.ts +11 -0
- package/chat/stream/stream.channel.js +11 -0
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +1 -0
- package/chat/stream/stream.error.js +1 -0
- package/chat/stream/stream.error.js.map +1 -1
- package/chat/stream/stream.member.d.ts +6 -0
- package/chat/stream/stream.member.js +6 -0
- package/chat/stream/stream.member.js.map +1 -1
- package/chat/stream/stream.message.d.ts +4 -0
- package/chat/stream/stream.message.js +4 -0
- package/chat/stream/stream.message.js.map +1 -1
- package/chat/stream/stream.user.d.ts +18 -2
- package/chat/stream/stream.user.js +22 -0
- package/chat/stream/stream.user.js.map +1 -1
- package/core/_/api-error.d.ts +1 -0
- package/core/_/api-error.js +1 -0
- package/core/_/api-error.js.map +1 -1
- package/core/_/api-response.d.ts +1 -0
- package/core/_/api-response.js +1 -0
- package/core/_/api-response.js.map +1 -1
- package/core/_/cors-headers.d.ts +1 -0
- package/core/_/cors-headers.js +10 -9
- package/core/_/cors-headers.js.map +1 -1
- package/core/_/service-request.d.ts +2 -0
- package/core/_/service-request.js +7 -5
- package/core/_/service-request.js.map +1 -1
- package/deployment/_/serverless.d.ts +2 -0
- package/deployment/_/serverless.js +2 -0
- package/deployment/_/serverless.js.map +1 -1
- package/endpoint-test-factory/_/test-factory.d.ts +4 -0
- package/endpoint-test-factory/_/test-factory.js +9 -5
- package/endpoint-test-factory/_/test-factory.js.map +1 -1
- package/meet/index.d.ts +3 -0
- package/meet/index.js +3 -0
- package/meet/index.js.map +1 -1
- package/meet/twilio/twilio.api.d.ts +3 -0
- package/meet/twilio/twilio.api.js +3 -0
- package/meet/twilio/twilio.api.js.map +1 -1
- package/meet/twilio/twilio.auth.d.ts +5 -0
- package/meet/twilio/twilio.auth.js +4 -5
- package/meet/twilio/twilio.auth.js.map +1 -1
- package/meet/twilio/twilio.base.d.ts +5 -0
- package/meet/twilio/twilio.base.js +5 -0
- package/meet/twilio/twilio.base.js.map +1 -1
- package/meet/twilio/twilio.room.d.ts +4 -0
- package/meet/twilio/twilio.room.js +4 -0
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +1 -1
- package/swagger/_/swagger.d.ts +2 -0
- package/swagger/_/swagger.js +3 -5
- package/swagger/_/swagger.js.map +1 -1
- package/utils/_/encoder.d.ts +2 -0
- package/utils/_/encoder.js +2 -0
- package/utils/_/encoder.js.map +1 -1
- package/utils/_/encryptor.d.ts +2 -0
- package/utils/_/encryptor.js +5 -7
- package/utils/_/encryptor.js.map +1 -1
- package/utils/_/hasher.d.ts +3 -0
- package/utils/_/hasher.js +4 -5
- package/utils/_/hasher.js.map +1 -1
- package/utils/_/object-mapper.d.ts +1 -0
- package/utils/_/object-mapper.js +1 -0
- package/utils/_/object-mapper.js.map +1 -1
- package/utils/_/string-formatter.d.ts +4 -0
- package/utils/_/string-formatter.js +4 -0
- package/utils/_/string-formatter.js.map +1 -1
- package/utils/_/utc-date.d.ts +4 -0
- package/utils/_/utc-date.js +12 -8
- package/utils/_/utc-date.js.map +1 -1
- package/validators/_/checker.d.ts +7 -0
- package/validators/_/checker.js +7 -0
- package/validators/_/checker.js.map +1 -1
- package/validators/_/regex.d.ts +15 -0
- package/validators/_/regex.js +15 -0
- package/validators/_/regex.js.map +1 -1
package/utils/_/utc-date.d.ts
CHANGED
|
@@ -5,23 +5,27 @@ import { Interval } from "../../enums";
|
|
|
5
5
|
export declare abstract class UtcDate {
|
|
6
6
|
/**
|
|
7
7
|
* Get Utc Date Time from date value
|
|
8
|
+
*
|
|
8
9
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
9
10
|
* @returns {Date} Utc Date Time
|
|
10
11
|
*/
|
|
11
12
|
static convert(dtm: string | number): Date;
|
|
12
13
|
/**
|
|
13
14
|
* Get current Utc Date Time
|
|
15
|
+
*
|
|
14
16
|
* @returns {Date} Current Utc Date Time
|
|
15
17
|
*/
|
|
16
18
|
static now(): Date;
|
|
17
19
|
/**
|
|
18
20
|
* Get current Utc Date Time as a Timestamp
|
|
21
|
+
*
|
|
19
22
|
* @param {number?} min optional number of min to add to the current datetime
|
|
20
23
|
* @returns {number} Utc Timestamp
|
|
21
24
|
*/
|
|
22
25
|
static timestamp(min?: number): number;
|
|
23
26
|
/**
|
|
24
27
|
* Add or subtract days to specific date
|
|
28
|
+
*
|
|
25
29
|
* @param {Date} date date to start with
|
|
26
30
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
27
31
|
* @param {number} units number of units of given interval to add
|
package/utils/_/utc-date.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.UtcDate = void 0;
|
|
|
7
7
|
class UtcDate {
|
|
8
8
|
/**
|
|
9
9
|
* Get Utc Date Time from date value
|
|
10
|
+
*
|
|
10
11
|
* @param {string | number} dtm Date to be parsed to Utc
|
|
11
12
|
* @returns {Date} Utc Date Time
|
|
12
13
|
*/
|
|
@@ -15,6 +16,7 @@ class UtcDate {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Get current Utc Date Time
|
|
19
|
+
*
|
|
18
20
|
* @returns {Date} Current Utc Date Time
|
|
19
21
|
*/
|
|
20
22
|
static now() {
|
|
@@ -22,6 +24,7 @@ class UtcDate {
|
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Get current Utc Date Time as a Timestamp
|
|
27
|
+
*
|
|
25
28
|
* @param {number?} min optional number of min to add to the current datetime
|
|
26
29
|
* @returns {number} Utc Timestamp
|
|
27
30
|
*/
|
|
@@ -36,6 +39,7 @@ class UtcDate {
|
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
38
41
|
* Add or subtract days to specific date
|
|
42
|
+
*
|
|
39
43
|
* @param {Date} date date to start with
|
|
40
44
|
* @param {Interval} interval one of: year, quarter, month, week, day, hour, minute, second
|
|
41
45
|
* @param {number} units number of units of given interval to add
|
|
@@ -46,28 +50,28 @@ class UtcDate {
|
|
|
46
50
|
return undefined;
|
|
47
51
|
let newDate;
|
|
48
52
|
switch (interval) {
|
|
49
|
-
case "year" /*
|
|
53
|
+
case "year" /* Year */:
|
|
50
54
|
newDate = new Date(date.setFullYear(date.getFullYear() + units));
|
|
51
55
|
break;
|
|
52
|
-
case "quarter" /*
|
|
56
|
+
case "quarter" /* Quarter */:
|
|
53
57
|
newDate = new Date(date.setMonth(date.getMonth() + 3 * units));
|
|
54
58
|
break;
|
|
55
|
-
case "month" /*
|
|
59
|
+
case "month" /* Month */:
|
|
56
60
|
newDate = new Date(date.setMonth(date.getMonth() + units));
|
|
57
61
|
break;
|
|
58
|
-
case "week" /*
|
|
62
|
+
case "week" /* Week */:
|
|
59
63
|
newDate = new Date(date.setDate(date.getDate() + 7 * units));
|
|
60
64
|
break;
|
|
61
|
-
case "day" /*
|
|
65
|
+
case "day" /* Day */:
|
|
62
66
|
newDate = new Date(date.setDate(date.getDate() + units));
|
|
63
67
|
break;
|
|
64
|
-
case "hour" /*
|
|
68
|
+
case "hour" /* Hour */:
|
|
65
69
|
newDate = new Date(date.setTime(date.getTime() + units * 3600000));
|
|
66
70
|
break;
|
|
67
|
-
case "minute" /*
|
|
71
|
+
case "minute" /* Minute */:
|
|
68
72
|
newDate = new Date(date.setTime(date.getTime() + units * 60000));
|
|
69
73
|
break;
|
|
70
|
-
case "second" /*
|
|
74
|
+
case "second" /* Second */:
|
|
71
75
|
newDate = new Date(date.setTime(date.getTime() + units * 1000));
|
|
72
76
|
break;
|
|
73
77
|
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;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,GAAoB;QAC/B,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG;QACN,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAC,GAAY;QACzB,MAAM,GAAG,GAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,EAAE;YAChB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;SAC1E;aAAM;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;SACxC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,IAAU,EAAE,QAAkB,EAAE,KAAa;QACxD,IA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AO,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;AA7ED,0BA6EC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export declare abstract class Checker {
|
|
5
5
|
/**
|
|
6
6
|
* Method to match value against the Regular Expression
|
|
7
|
+
*
|
|
7
8
|
* @param {RegExp} regex regular expression to match the value format
|
|
8
9
|
* @param {string} value value to match
|
|
9
10
|
* @returns {boolean} is matched
|
|
@@ -11,12 +12,14 @@ export declare abstract class Checker {
|
|
|
11
12
|
static isMatch(regex: RegExp, value: string): boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Method to check if value is null or empty
|
|
15
|
+
*
|
|
14
16
|
* @param {string | undefined | null} value a value to validate
|
|
15
17
|
* @returns {boolean} is null or empty
|
|
16
18
|
*/
|
|
17
19
|
static isNullOrEmpty(value: string | undefined | null): boolean;
|
|
18
20
|
/**
|
|
19
21
|
* Method to check if the number is modular (returns 0)
|
|
22
|
+
*
|
|
20
23
|
* @param {number} mod mod factor
|
|
21
24
|
* @param {number} value number to run mod function on
|
|
22
25
|
* @returns {boolean} is modular number
|
|
@@ -24,6 +27,7 @@ export declare abstract class Checker {
|
|
|
24
27
|
static isModularBy(mod: number, value: number): boolean;
|
|
25
28
|
/**
|
|
26
29
|
* Method to check min length of a value
|
|
30
|
+
*
|
|
27
31
|
* @param {number} length min length
|
|
28
32
|
* @param {string} value value to check
|
|
29
33
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -31,6 +35,7 @@ export declare abstract class Checker {
|
|
|
31
35
|
static hasMinLength(length: number, value: string): boolean;
|
|
32
36
|
/**
|
|
33
37
|
* Method to check max length of a value
|
|
38
|
+
*
|
|
34
39
|
* @param {number} length max length
|
|
35
40
|
* @param {string} value value to check
|
|
36
41
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -38,6 +43,7 @@ export declare abstract class Checker {
|
|
|
38
43
|
static hasMaxLength(length: number, value: string): boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Method to check exact length of a value
|
|
46
|
+
*
|
|
41
47
|
* @param {number} length exact length
|
|
42
48
|
* @param {string} value value to check
|
|
43
49
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -45,6 +51,7 @@ export declare abstract class Checker {
|
|
|
45
51
|
static hasExactLength(length: number, value: string): boolean;
|
|
46
52
|
/**
|
|
47
53
|
* Check a specific name or string
|
|
54
|
+
*
|
|
48
55
|
* @param {number} min minimum length
|
|
49
56
|
* @param {number} max maximum length
|
|
50
57
|
* @param {string} value string value to check
|
package/validators/_/checker.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.Checker = void 0;
|
|
|
7
7
|
class Checker {
|
|
8
8
|
/**
|
|
9
9
|
* Method to match value against the Regular Expression
|
|
10
|
+
*
|
|
10
11
|
* @param {RegExp} regex regular expression to match the value format
|
|
11
12
|
* @param {string} value value to match
|
|
12
13
|
* @returns {boolean} is matched
|
|
@@ -16,6 +17,7 @@ class Checker {
|
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Method to check if value is null or empty
|
|
20
|
+
*
|
|
19
21
|
* @param {string | undefined | null} value a value to validate
|
|
20
22
|
* @returns {boolean} is null or empty
|
|
21
23
|
*/
|
|
@@ -30,6 +32,7 @@ class Checker {
|
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Method to check if the number is modular (returns 0)
|
|
35
|
+
*
|
|
33
36
|
* @param {number} mod mod factor
|
|
34
37
|
* @param {number} value number to run mod function on
|
|
35
38
|
* @returns {boolean} is modular number
|
|
@@ -39,6 +42,7 @@ class Checker {
|
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Method to check min length of a value
|
|
45
|
+
*
|
|
42
46
|
* @param {number} length min length
|
|
43
47
|
* @param {string} value value to check
|
|
44
48
|
* @returns {boolean} if value's length is greater or equal to the length param
|
|
@@ -48,6 +52,7 @@ class Checker {
|
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* Method to check max length of a value
|
|
55
|
+
*
|
|
51
56
|
* @param {number} length max length
|
|
52
57
|
* @param {string} value value to check
|
|
53
58
|
* @returns {boolean} if value's length is less or equal to the length param
|
|
@@ -57,6 +62,7 @@ class Checker {
|
|
|
57
62
|
}
|
|
58
63
|
/**
|
|
59
64
|
* Method to check exact length of a value
|
|
65
|
+
*
|
|
60
66
|
* @param {number} length exact length
|
|
61
67
|
* @param {string} value value to check
|
|
62
68
|
* @returns {boolean} if value's length is exact length as the length param
|
|
@@ -66,6 +72,7 @@ class Checker {
|
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
68
74
|
* Check a specific name or string
|
|
75
|
+
*
|
|
69
76
|
* @param {number} min minimum length
|
|
70
77
|
* @param {number} max maximum length
|
|
71
78
|
* @param {string} value string value to check
|
|
@@ -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;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,KAAa,EAAE,KAAa;QACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;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,Q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
CHANGED
|
@@ -4,78 +4,93 @@
|
|
|
4
4
|
export declare abstract class Regex {
|
|
5
5
|
/**
|
|
6
6
|
* Method that provides regular expression for alphabetic character validation
|
|
7
|
+
*
|
|
7
8
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
8
9
|
* @returns {RegExp} regular expression
|
|
9
10
|
*/
|
|
10
11
|
static alpha(includeSpaces: boolean): RegExp;
|
|
11
12
|
/**
|
|
12
13
|
* Method that provides regular express for alpha-numeric character validation
|
|
14
|
+
*
|
|
13
15
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
14
16
|
* @returns {RegExp} regular expression
|
|
15
17
|
*/
|
|
16
18
|
static alphaNumeric(includeSpaces: boolean): RegExp;
|
|
17
19
|
/**
|
|
18
20
|
* Method that provides regular expression for numeric character validation
|
|
21
|
+
*
|
|
19
22
|
* @returns {RegExp} regular expression
|
|
20
23
|
*/
|
|
21
24
|
static numeric(): RegExp;
|
|
22
25
|
/**
|
|
23
26
|
* Method that provides regular expression for a value that contains a number validation
|
|
27
|
+
*
|
|
24
28
|
* @returns {RegExp} regular expression
|
|
25
29
|
*/
|
|
26
30
|
static hasNumber(): RegExp;
|
|
27
31
|
/**
|
|
28
32
|
* Method that provides regular expression for a value that contains special characters validation
|
|
33
|
+
*
|
|
29
34
|
* @returns {RegExp} regular expression
|
|
30
35
|
*/
|
|
31
36
|
static hasSpecialCharacter(): RegExp;
|
|
32
37
|
/**
|
|
33
38
|
* Method that provides regular expression for a value that is all upper case validation
|
|
39
|
+
*
|
|
34
40
|
* @returns {RegExp} regular expression
|
|
35
41
|
*/
|
|
36
42
|
static isAllUpperCase(): RegExp;
|
|
37
43
|
/**
|
|
38
44
|
* Method that provides regular expression for a value that contains upper case validation
|
|
45
|
+
*
|
|
39
46
|
* @returns {RegExp} regular expression
|
|
40
47
|
*/
|
|
41
48
|
static hasUpperCase(): RegExp;
|
|
42
49
|
/**
|
|
43
50
|
* Method that provides regular expression for a value that is all lower case validation
|
|
51
|
+
*
|
|
44
52
|
* @returns {RegExp} regular expression
|
|
45
53
|
*/
|
|
46
54
|
static isAllLowerCase(): RegExp;
|
|
47
55
|
/**
|
|
48
56
|
* Method that provides regular expression for a value that contains lower case validation
|
|
57
|
+
*
|
|
49
58
|
* @returns {RegExp} regular expression
|
|
50
59
|
*/
|
|
51
60
|
static hasLowerCase(): RegExp;
|
|
52
61
|
/**
|
|
53
62
|
* Method that provides regular expression for email address validation
|
|
63
|
+
*
|
|
54
64
|
* @returns {RegExp} regular expression
|
|
55
65
|
*/
|
|
56
66
|
static emailAddress(): RegExp;
|
|
57
67
|
/**
|
|
58
68
|
* Method that provides regular expression for a phone number validation (USA)
|
|
69
|
+
*
|
|
59
70
|
* @returns {RegExp} regular expression
|
|
60
71
|
*/
|
|
61
72
|
static phoneNumber(): RegExp;
|
|
62
73
|
/**
|
|
63
74
|
* Method that provides regular expression for a street validation
|
|
75
|
+
*
|
|
64
76
|
* @returns {RegExp} regular expression
|
|
65
77
|
*/
|
|
66
78
|
static street(): RegExp;
|
|
67
79
|
/**
|
|
68
80
|
* Method that provides regular expression for a time validation
|
|
81
|
+
*
|
|
69
82
|
* @returns {RegExp} regular expression
|
|
70
83
|
*/
|
|
71
84
|
static time(): RegExp;
|
|
72
85
|
/**
|
|
73
86
|
* Method that provides regular expression for a URL validation
|
|
87
|
+
*
|
|
74
88
|
* @returns {RegExp} regular expression
|
|
75
89
|
*/
|
|
76
90
|
static url(): RegExp;
|
|
77
91
|
/**
|
|
78
92
|
* Method that provides regular expression for a social media link validation
|
|
93
|
+
*
|
|
79
94
|
* @param {string} social name of the social media
|
|
80
95
|
* @returns {RegExp} regular expression
|
|
81
96
|
*/
|
package/validators/_/regex.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.Regex = void 0;
|
|
|
7
7
|
class Regex {
|
|
8
8
|
/**
|
|
9
9
|
* Method that provides regular expression for alphabetic character validation
|
|
10
|
+
*
|
|
10
11
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
11
12
|
* @returns {RegExp} regular expression
|
|
12
13
|
*/
|
|
@@ -20,6 +21,7 @@ class Regex {
|
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Method that provides regular express for alpha-numeric character validation
|
|
24
|
+
*
|
|
23
25
|
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
24
26
|
* @returns {RegExp} regular expression
|
|
25
27
|
*/
|
|
@@ -33,6 +35,7 @@ class Regex {
|
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Method that provides regular expression for numeric character validation
|
|
38
|
+
*
|
|
36
39
|
* @returns {RegExp} regular expression
|
|
37
40
|
*/
|
|
38
41
|
static numeric() {
|
|
@@ -40,6 +43,7 @@ class Regex {
|
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* Method that provides regular expression for a value that contains a number validation
|
|
46
|
+
*
|
|
43
47
|
* @returns {RegExp} regular expression
|
|
44
48
|
*/
|
|
45
49
|
static hasNumber() {
|
|
@@ -47,6 +51,7 @@ class Regex {
|
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* Method that provides regular expression for a value that contains special characters validation
|
|
54
|
+
*
|
|
50
55
|
* @returns {RegExp} regular expression
|
|
51
56
|
*/
|
|
52
57
|
static hasSpecialCharacter() {
|
|
@@ -54,6 +59,7 @@ class Regex {
|
|
|
54
59
|
}
|
|
55
60
|
/**
|
|
56
61
|
* Method that provides regular expression for a value that is all upper case validation
|
|
62
|
+
*
|
|
57
63
|
* @returns {RegExp} regular expression
|
|
58
64
|
*/
|
|
59
65
|
static isAllUpperCase() {
|
|
@@ -61,6 +67,7 @@ class Regex {
|
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
63
69
|
* Method that provides regular expression for a value that contains upper case validation
|
|
70
|
+
*
|
|
64
71
|
* @returns {RegExp} regular expression
|
|
65
72
|
*/
|
|
66
73
|
static hasUpperCase() {
|
|
@@ -68,6 +75,7 @@ class Regex {
|
|
|
68
75
|
}
|
|
69
76
|
/**
|
|
70
77
|
* Method that provides regular expression for a value that is all lower case validation
|
|
78
|
+
*
|
|
71
79
|
* @returns {RegExp} regular expression
|
|
72
80
|
*/
|
|
73
81
|
static isAllLowerCase() {
|
|
@@ -75,6 +83,7 @@ class Regex {
|
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* Method that provides regular expression for a value that contains lower case validation
|
|
86
|
+
*
|
|
78
87
|
* @returns {RegExp} regular expression
|
|
79
88
|
*/
|
|
80
89
|
static hasLowerCase() {
|
|
@@ -82,6 +91,7 @@ class Regex {
|
|
|
82
91
|
}
|
|
83
92
|
/**
|
|
84
93
|
* Method that provides regular expression for email address validation
|
|
94
|
+
*
|
|
85
95
|
* @returns {RegExp} regular expression
|
|
86
96
|
*/
|
|
87
97
|
static emailAddress() {
|
|
@@ -89,6 +99,7 @@ class Regex {
|
|
|
89
99
|
}
|
|
90
100
|
/**
|
|
91
101
|
* Method that provides regular expression for a phone number validation (USA)
|
|
102
|
+
*
|
|
92
103
|
* @returns {RegExp} regular expression
|
|
93
104
|
*/
|
|
94
105
|
static phoneNumber() {
|
|
@@ -96,6 +107,7 @@ class Regex {
|
|
|
96
107
|
}
|
|
97
108
|
/**
|
|
98
109
|
* Method that provides regular expression for a street validation
|
|
110
|
+
*
|
|
99
111
|
* @returns {RegExp} regular expression
|
|
100
112
|
*/
|
|
101
113
|
static street() {
|
|
@@ -103,6 +115,7 @@ class Regex {
|
|
|
103
115
|
}
|
|
104
116
|
/**
|
|
105
117
|
* Method that provides regular expression for a time validation
|
|
118
|
+
*
|
|
106
119
|
* @returns {RegExp} regular expression
|
|
107
120
|
*/
|
|
108
121
|
static time() {
|
|
@@ -110,6 +123,7 @@ class Regex {
|
|
|
110
123
|
}
|
|
111
124
|
/**
|
|
112
125
|
* Method that provides regular expression for a URL validation
|
|
126
|
+
*
|
|
113
127
|
* @returns {RegExp} regular expression
|
|
114
128
|
*/
|
|
115
129
|
static url() {
|
|
@@ -117,6 +131,7 @@ class Regex {
|
|
|
117
131
|
}
|
|
118
132
|
/**
|
|
119
133
|
* Method that provides regular expression for a social media link validation
|
|
134
|
+
*
|
|
120
135
|
* @param {string} social name of the social media
|
|
121
136
|
* @returns {RegExp} regular expression
|
|
122
137
|
*/
|
|
@@ -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;;GAEG;AACH,MAAsB,KAAK;IACvB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,aAAsB;QAC/B,IAAI,aAAa,EAAE;YACf,OAAO,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;SACvC;aAAM;YACH,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;SACpC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,aAAsB;QACtC,IAAI,aAAa,EAAE;YACf,OAAO,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;SAC1C;aAAM;YACH,OAAO,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;SACvC;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,mBAAmB;QACtB,OAAO,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,cAAc;QACjB,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;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