@bwi-mentorspaces/application-utils-npm 0.0.6 → 0.0.9
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 +36 -36
- package/chat/index.js +58 -58
- package/chat/stream/enum/index.d.ts +33 -27
- package/chat/stream/enum/index.js +41 -34
- package/chat/stream/enum/index.js.map +1 -1
- package/chat/stream/index.d.ts +9 -9
- package/chat/stream/index.js +17 -17
- package/chat/stream/models/_/channel.data.d.ts +19 -19
- package/chat/stream/models/_/channel.data.js +2 -2
- package/chat/stream/models/_/channel.member.d.ts +14 -14
- package/chat/stream/models/_/channel.member.js +11 -11
- package/chat/stream/models/_/channel.response.d.ts +8 -8
- package/chat/stream/models/_/channel.response.js +2 -2
- package/chat/stream/models/_/event.data.d.ts +16 -0
- package/chat/stream/models/_/event.data.js +4 -0
- package/chat/stream/models/_/event.data.js.map +1 -0
- package/chat/stream/models/_/message.response.d.ts +8 -8
- package/chat/stream/models/_/message.response.js +2 -2
- package/chat/stream/models/_/stream.config.d.ts +22 -22
- package/chat/stream/models/_/stream.config.js +2 -2
- package/chat/stream/models/_/user.response.d.ts +8 -8
- package/chat/stream/models/_/user.response.js +2 -2
- package/chat/stream/models/index.d.ts +9 -7
- package/chat/stream/models/index.js +5 -5
- package/chat/stream/models/index.js.map +1 -1
- package/chat/stream/stream.api.d.ts +63 -63
- package/chat/stream/stream.api.js +76 -76
- package/chat/stream/stream.auth.d.ts +70 -70
- package/chat/stream/stream.auth.js +80 -80
- package/chat/stream/stream.base.d.ts +56 -56
- package/chat/stream/stream.base.js +93 -93
- package/chat/stream/stream.channel.d.ts +132 -118
- package/chat/stream/stream.channel.js +306 -285
- package/chat/stream/stream.channel.js.map +1 -1
- package/chat/stream/stream.error.d.ts +19 -19
- package/chat/stream/stream.error.js +17 -17
- package/chat/stream/stream.member.d.ts +75 -75
- package/chat/stream/stream.member.js +175 -175
- package/chat/stream/stream.message.d.ts +59 -59
- package/chat/stream/stream.message.js +112 -112
- package/chat/stream/stream.user.d.ts +49 -49
- package/chat/stream/stream.user.js +90 -90
- package/core/_/api-error.d.ts +24 -24
- package/core/_/api-error.js +21 -21
- package/core/_/api-response.d.ts +25 -25
- package/core/_/api-response.js +21 -21
- package/core/_/cors-headers.d.ts +16 -16
- package/core/_/cors-headers.js +32 -32
- package/core/_/model.d.ts +39 -31
- package/core/_/model.js +2 -2
- package/core/_/service-request.d.ts +66 -66
- package/core/_/service-request.js +104 -104
- package/core/_/service-request.js.map +1 -1
- package/core/index.d.ts +10 -10
- package/core/index.js +11 -11
- package/coverage/coverage-final.json +4 -0
- package/deployment/_/serverless.d.ts +26 -26
- package/deployment/_/serverless.js +43 -43
- package/deployment/index.d.ts +2 -2
- package/deployment/index.js +5 -5
- package/endpoint-test-factory/_/test-factory.d.ts +45 -45
- package/endpoint-test-factory/_/test-factory.js +91 -91
- package/endpoint-test-factory/index.d.ts +2 -2
- package/endpoint-test-factory/index.js +5 -5
- package/enums/index.d.ts +92 -92
- package/enums/index.js +2 -2
- package/jest.config.d.ts +12 -0
- package/jest.config.js +16 -0
- package/jest.config.js.map +1 -0
- package/meet/index.d.ts +36 -36
- package/meet/index.js +58 -58
- package/meet/tests/unit/twilio/twilio.room.test.d.ts +1 -0
- package/meet/tests/unit/twilio/twilio.room.test.js +33 -0
- package/meet/tests/unit/twilio/twilio.room.test.js.map +1 -0
- package/meet/twilio/enum/index.d.ts +6 -6
- package/meet/twilio/enum/index.js +10 -10
- package/meet/twilio/index.d.ts +5 -5
- package/meet/twilio/index.js +11 -11
- package/meet/twilio/models/_/room.data.d.ts +6 -6
- package/meet/twilio/models/_/room.data.js +2 -2
- package/meet/twilio/models/_/twilio.config.d.ts +29 -29
- package/meet/twilio/models/_/twilio.config.js +2 -2
- package/meet/twilio/models/index.d.ts +3 -3
- package/meet/twilio/models/index.js +2 -2
- package/meet/twilio/twilio.api.d.ts +28 -28
- package/meet/twilio/twilio.api.js +45 -45
- package/meet/twilio/twilio.auth.d.ts +55 -55
- package/meet/twilio/twilio.auth.js +83 -83
- package/meet/twilio/twilio.base.d.ts +41 -41
- package/meet/twilio/twilio.base.js +53 -53
- package/meet/twilio/twilio.room.d.ts +58 -46
- package/meet/twilio/twilio.room.js +141 -124
- package/meet/twilio/twilio.room.js.map +1 -1
- package/package.json +64 -57
- package/swagger/_/swagger.config.d.ts +21 -21
- package/swagger/_/swagger.config.js +2 -2
- package/swagger/_/swagger.d.ts +37 -37
- package/swagger/_/swagger.js +78 -78
- package/swagger/index.d.ts +3 -3
- package/swagger/index.js +5 -5
- package/types/index.d.ts +19 -19
- package/types/index.js +2 -2
- package/utils/_/encoder.d.ts +19 -19
- package/utils/_/encoder.js +27 -27
- package/utils/_/encryptor.d.ts +26 -26
- package/utils/_/encryptor.js +67 -67
- package/utils/_/hasher.d.ts +25 -25
- package/utils/_/hasher.js +63 -63
- package/utils/_/object-mapper.d.ts +12 -12
- package/utils/_/object-mapper.js +22 -22
- package/utils/_/string-formatter.d.ts +34 -34
- package/utils/_/string-formatter.js +49 -49
- package/utils/_/utc-date.d.ts +35 -35
- package/utils/_/utc-date.js +84 -84
- package/utils/index.d.ts +7 -7
- package/utils/index.js +15 -15
- package/validators/_/checker.d.ts +62 -62
- package/validators/_/checker.js +98 -98
- package/validators/_/regex.d.ts +98 -98
- package/validators/_/regex.js +142 -142
- package/validators/index.d.ts +3 -3
- package/validators/index.js +7 -7
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class to run value checks for validation purposes
|
|
3
|
-
*/
|
|
4
|
-
export declare abstract class Checker {
|
|
5
|
-
/**
|
|
6
|
-
* Method to match value against the Regular Expression
|
|
7
|
-
*
|
|
8
|
-
* @param {RegExp} regex regular expression to match the value format
|
|
9
|
-
* @param {string} value value to match
|
|
10
|
-
* @returns {boolean} is matched
|
|
11
|
-
*/
|
|
12
|
-
static isMatch(regex: RegExp, value: string): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Method to check if value is null or empty
|
|
15
|
-
*
|
|
16
|
-
* @param {string | undefined | null} value a value to validate
|
|
17
|
-
* @returns {boolean} is null or empty
|
|
18
|
-
*/
|
|
19
|
-
static isNullOrEmpty(value: string | undefined | null): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Method to check if the number is modular (returns 0)
|
|
22
|
-
*
|
|
23
|
-
* @param {number} mod mod factor
|
|
24
|
-
* @param {number} value number to run mod function on
|
|
25
|
-
* @returns {boolean} is modular number
|
|
26
|
-
*/
|
|
27
|
-
static isModularBy(mod: number, value: number): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Method to check min length of a value
|
|
30
|
-
*
|
|
31
|
-
* @param {number} length min length
|
|
32
|
-
* @param {string} value value to check
|
|
33
|
-
* @returns {boolean} if value's length is greater or equal to the length param
|
|
34
|
-
*/
|
|
35
|
-
static hasMinLength(length: number, value: string): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Method to check max length of a value
|
|
38
|
-
*
|
|
39
|
-
* @param {number} length max length
|
|
40
|
-
* @param {string} value value to check
|
|
41
|
-
* @returns {boolean} if value's length is less or equal to the length param
|
|
42
|
-
*/
|
|
43
|
-
static hasMaxLength(length: number, value: string): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Method to check exact length of a value
|
|
46
|
-
*
|
|
47
|
-
* @param {number} length exact length
|
|
48
|
-
* @param {string} value value to check
|
|
49
|
-
* @returns {boolean} if value's length is exact length as the length param
|
|
50
|
-
*/
|
|
51
|
-
static hasExactLength(length: number, value: string): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Check a specific name or string
|
|
54
|
-
*
|
|
55
|
-
* @param {number} min minimum length
|
|
56
|
-
* @param {number} max maximum length
|
|
57
|
-
* @param {string} value string value to check
|
|
58
|
-
* @param {boolean} isRequired if the value is required
|
|
59
|
-
* @returns {boolean} true / false
|
|
60
|
-
*/
|
|
61
|
-
static isStringValid(min: number, max: number, value: string, isRequired?: boolean): boolean;
|
|
62
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Class to run value checks for validation purposes
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class Checker {
|
|
5
|
+
/**
|
|
6
|
+
* Method to match value against the Regular Expression
|
|
7
|
+
*
|
|
8
|
+
* @param {RegExp} regex regular expression to match the value format
|
|
9
|
+
* @param {string} value value to match
|
|
10
|
+
* @returns {boolean} is matched
|
|
11
|
+
*/
|
|
12
|
+
static isMatch(regex: RegExp, value: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Method to check if value is null or empty
|
|
15
|
+
*
|
|
16
|
+
* @param {string | undefined | null} value a value to validate
|
|
17
|
+
* @returns {boolean} is null or empty
|
|
18
|
+
*/
|
|
19
|
+
static isNullOrEmpty(value: string | undefined | null): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Method to check if the number is modular (returns 0)
|
|
22
|
+
*
|
|
23
|
+
* @param {number} mod mod factor
|
|
24
|
+
* @param {number} value number to run mod function on
|
|
25
|
+
* @returns {boolean} is modular number
|
|
26
|
+
*/
|
|
27
|
+
static isModularBy(mod: number, value: number): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Method to check min length of a value
|
|
30
|
+
*
|
|
31
|
+
* @param {number} length min length
|
|
32
|
+
* @param {string} value value to check
|
|
33
|
+
* @returns {boolean} if value's length is greater or equal to the length param
|
|
34
|
+
*/
|
|
35
|
+
static hasMinLength(length: number, value: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Method to check max length of a value
|
|
38
|
+
*
|
|
39
|
+
* @param {number} length max length
|
|
40
|
+
* @param {string} value value to check
|
|
41
|
+
* @returns {boolean} if value's length is less or equal to the length param
|
|
42
|
+
*/
|
|
43
|
+
static hasMaxLength(length: number, value: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Method to check exact length of a value
|
|
46
|
+
*
|
|
47
|
+
* @param {number} length exact length
|
|
48
|
+
* @param {string} value value to check
|
|
49
|
+
* @returns {boolean} if value's length is exact length as the length param
|
|
50
|
+
*/
|
|
51
|
+
static hasExactLength(length: number, value: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Check a specific name or string
|
|
54
|
+
*
|
|
55
|
+
* @param {number} min minimum length
|
|
56
|
+
* @param {number} max maximum length
|
|
57
|
+
* @param {string} value string value to check
|
|
58
|
+
* @param {boolean} isRequired if the value is required
|
|
59
|
+
* @returns {boolean} true / false
|
|
60
|
+
*/
|
|
61
|
+
static isStringValid(min: number, max: number, value: string, isRequired?: boolean): boolean;
|
|
62
|
+
}
|
package/validators/_/checker.js
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Checker = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Class to run value checks for validation purposes
|
|
6
|
-
*/
|
|
7
|
-
class Checker {
|
|
8
|
-
/**
|
|
9
|
-
* Method to match value against the Regular Expression
|
|
10
|
-
*
|
|
11
|
-
* @param {RegExp} regex regular expression to match the value format
|
|
12
|
-
* @param {string} value value to match
|
|
13
|
-
* @returns {boolean} is matched
|
|
14
|
-
*/
|
|
15
|
-
static isMatch(regex, value) {
|
|
16
|
-
return regex.test(value);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Method to check if value is null or empty
|
|
20
|
-
*
|
|
21
|
-
* @param {string | undefined | null} value a value to validate
|
|
22
|
-
* @returns {boolean} is null or empty
|
|
23
|
-
*/
|
|
24
|
-
static isNullOrEmpty(value) {
|
|
25
|
-
if (value === undefined) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
if (value === null) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
return /^\s*$/.test(value.toString()) || value.toString().trim().length === 0;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Method to check if the number is modular (returns 0)
|
|
35
|
-
*
|
|
36
|
-
* @param {number} mod mod factor
|
|
37
|
-
* @param {number} value number to run mod function on
|
|
38
|
-
* @returns {boolean} is modular number
|
|
39
|
-
*/
|
|
40
|
-
static isModularBy(mod, value) {
|
|
41
|
-
return value % mod == 0;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Method to check min length of a value
|
|
45
|
-
*
|
|
46
|
-
* @param {number} length min length
|
|
47
|
-
* @param {string} value value to check
|
|
48
|
-
* @returns {boolean} if value's length is greater or equal to the length param
|
|
49
|
-
*/
|
|
50
|
-
static hasMinLength(length, value) {
|
|
51
|
-
return value.length >= length;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Method to check max length of a value
|
|
55
|
-
*
|
|
56
|
-
* @param {number} length max length
|
|
57
|
-
* @param {string} value value to check
|
|
58
|
-
* @returns {boolean} if value's length is less or equal to the length param
|
|
59
|
-
*/
|
|
60
|
-
static hasMaxLength(length, value) {
|
|
61
|
-
return value.length <= length;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Method to check exact length of a value
|
|
65
|
-
*
|
|
66
|
-
* @param {number} length exact length
|
|
67
|
-
* @param {string} value value to check
|
|
68
|
-
* @returns {boolean} if value's length is exact length as the length param
|
|
69
|
-
*/
|
|
70
|
-
static hasExactLength(length, value) {
|
|
71
|
-
return value.length == length;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Check a specific name or string
|
|
75
|
-
*
|
|
76
|
-
* @param {number} min minimum length
|
|
77
|
-
* @param {number} max maximum length
|
|
78
|
-
* @param {string} value string value to check
|
|
79
|
-
* @param {boolean} isRequired if the value is required
|
|
80
|
-
* @returns {boolean} true / false
|
|
81
|
-
*/
|
|
82
|
-
static isStringValid(min, max, value, isRequired = true) {
|
|
83
|
-
if (isRequired && Checker.isNullOrEmpty(value)) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
if (!isRequired && Checker.isNullOrEmpty(value)) {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
if (!Checker.isNullOrEmpty(value)) {
|
|
90
|
-
// check value
|
|
91
|
-
const minLength = Checker.hasMinLength(min, value);
|
|
92
|
-
const maxLength = Checker.hasMaxLength(max, value);
|
|
93
|
-
//return the result.
|
|
94
|
-
return minLength && maxLength;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.Checker = Checker;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Checker = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Class to run value checks for validation purposes
|
|
6
|
+
*/
|
|
7
|
+
class Checker {
|
|
8
|
+
/**
|
|
9
|
+
* Method to match value against the Regular Expression
|
|
10
|
+
*
|
|
11
|
+
* @param {RegExp} regex regular expression to match the value format
|
|
12
|
+
* @param {string} value value to match
|
|
13
|
+
* @returns {boolean} is matched
|
|
14
|
+
*/
|
|
15
|
+
static isMatch(regex, value) {
|
|
16
|
+
return regex.test(value);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Method to check if value is null or empty
|
|
20
|
+
*
|
|
21
|
+
* @param {string | undefined | null} value a value to validate
|
|
22
|
+
* @returns {boolean} is null or empty
|
|
23
|
+
*/
|
|
24
|
+
static isNullOrEmpty(value) {
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
if (value === null) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return /^\s*$/.test(value.toString()) || value.toString().trim().length === 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Method to check if the number is modular (returns 0)
|
|
35
|
+
*
|
|
36
|
+
* @param {number} mod mod factor
|
|
37
|
+
* @param {number} value number to run mod function on
|
|
38
|
+
* @returns {boolean} is modular number
|
|
39
|
+
*/
|
|
40
|
+
static isModularBy(mod, value) {
|
|
41
|
+
return value % mod == 0;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Method to check min length of a value
|
|
45
|
+
*
|
|
46
|
+
* @param {number} length min length
|
|
47
|
+
* @param {string} value value to check
|
|
48
|
+
* @returns {boolean} if value's length is greater or equal to the length param
|
|
49
|
+
*/
|
|
50
|
+
static hasMinLength(length, value) {
|
|
51
|
+
return value.length >= length;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Method to check max length of a value
|
|
55
|
+
*
|
|
56
|
+
* @param {number} length max length
|
|
57
|
+
* @param {string} value value to check
|
|
58
|
+
* @returns {boolean} if value's length is less or equal to the length param
|
|
59
|
+
*/
|
|
60
|
+
static hasMaxLength(length, value) {
|
|
61
|
+
return value.length <= length;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Method to check exact length of a value
|
|
65
|
+
*
|
|
66
|
+
* @param {number} length exact length
|
|
67
|
+
* @param {string} value value to check
|
|
68
|
+
* @returns {boolean} if value's length is exact length as the length param
|
|
69
|
+
*/
|
|
70
|
+
static hasExactLength(length, value) {
|
|
71
|
+
return value.length == length;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check a specific name or string
|
|
75
|
+
*
|
|
76
|
+
* @param {number} min minimum length
|
|
77
|
+
* @param {number} max maximum length
|
|
78
|
+
* @param {string} value string value to check
|
|
79
|
+
* @param {boolean} isRequired if the value is required
|
|
80
|
+
* @returns {boolean} true / false
|
|
81
|
+
*/
|
|
82
|
+
static isStringValid(min, max, value, isRequired = true) {
|
|
83
|
+
if (isRequired && Checker.isNullOrEmpty(value)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!isRequired && Checker.isNullOrEmpty(value)) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
if (!Checker.isNullOrEmpty(value)) {
|
|
90
|
+
// check value
|
|
91
|
+
const minLength = Checker.hasMinLength(min, value);
|
|
92
|
+
const maxLength = Checker.hasMaxLength(max, value);
|
|
93
|
+
//return the result.
|
|
94
|
+
return minLength && maxLength;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.Checker = Checker;
|
|
99
99
|
//# sourceMappingURL=checker.js.map
|
package/validators/_/regex.d.ts
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract class that provides Regular Expression patterns for validation
|
|
3
|
-
*/
|
|
4
|
-
export declare abstract class Regex {
|
|
5
|
-
/**
|
|
6
|
-
* Method that provides regular expression for alphabetic character validation
|
|
7
|
-
*
|
|
8
|
-
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
9
|
-
* @returns {RegExp} regular expression
|
|
10
|
-
*/
|
|
11
|
-
static alpha(includeSpaces: boolean): RegExp;
|
|
12
|
-
/**
|
|
13
|
-
* Method that provides regular express for alpha-numeric character validation
|
|
14
|
-
*
|
|
15
|
-
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
16
|
-
* @returns {RegExp} regular expression
|
|
17
|
-
*/
|
|
18
|
-
static alphaNumeric(includeSpaces: boolean): RegExp;
|
|
19
|
-
/**
|
|
20
|
-
* Method that provides regular expression for numeric character validation
|
|
21
|
-
*
|
|
22
|
-
* @returns {RegExp} regular expression
|
|
23
|
-
*/
|
|
24
|
-
static numeric(): RegExp;
|
|
25
|
-
/**
|
|
26
|
-
* Method that provides regular expression for a value that contains a number validation
|
|
27
|
-
*
|
|
28
|
-
* @returns {RegExp} regular expression
|
|
29
|
-
*/
|
|
30
|
-
static hasNumber(): RegExp;
|
|
31
|
-
/**
|
|
32
|
-
* Method that provides regular expression for a value that contains special characters validation
|
|
33
|
-
*
|
|
34
|
-
* @returns {RegExp} regular expression
|
|
35
|
-
*/
|
|
36
|
-
static hasSpecialCharacter(): RegExp;
|
|
37
|
-
/**
|
|
38
|
-
* Method that provides regular expression for a value that is all upper case validation
|
|
39
|
-
*
|
|
40
|
-
* @returns {RegExp} regular expression
|
|
41
|
-
*/
|
|
42
|
-
static isAllUpperCase(): RegExp;
|
|
43
|
-
/**
|
|
44
|
-
* Method that provides regular expression for a value that contains upper case validation
|
|
45
|
-
*
|
|
46
|
-
* @returns {RegExp} regular expression
|
|
47
|
-
*/
|
|
48
|
-
static hasUpperCase(): RegExp;
|
|
49
|
-
/**
|
|
50
|
-
* Method that provides regular expression for a value that is all lower case validation
|
|
51
|
-
*
|
|
52
|
-
* @returns {RegExp} regular expression
|
|
53
|
-
*/
|
|
54
|
-
static isAllLowerCase(): RegExp;
|
|
55
|
-
/**
|
|
56
|
-
* Method that provides regular expression for a value that contains lower case validation
|
|
57
|
-
*
|
|
58
|
-
* @returns {RegExp} regular expression
|
|
59
|
-
*/
|
|
60
|
-
static hasLowerCase(): RegExp;
|
|
61
|
-
/**
|
|
62
|
-
* Method that provides regular expression for email address validation
|
|
63
|
-
*
|
|
64
|
-
* @returns {RegExp} regular expression
|
|
65
|
-
*/
|
|
66
|
-
static emailAddress(): RegExp;
|
|
67
|
-
/**
|
|
68
|
-
* Method that provides regular expression for a phone number validation (USA)
|
|
69
|
-
*
|
|
70
|
-
* @returns {RegExp} regular expression
|
|
71
|
-
*/
|
|
72
|
-
static phoneNumber(): RegExp;
|
|
73
|
-
/**
|
|
74
|
-
* Method that provides regular expression for a street validation
|
|
75
|
-
*
|
|
76
|
-
* @returns {RegExp} regular expression
|
|
77
|
-
*/
|
|
78
|
-
static street(): RegExp;
|
|
79
|
-
/**
|
|
80
|
-
* Method that provides regular expression for a time validation
|
|
81
|
-
*
|
|
82
|
-
* @returns {RegExp} regular expression
|
|
83
|
-
*/
|
|
84
|
-
static time(): RegExp;
|
|
85
|
-
/**
|
|
86
|
-
* Method that provides regular expression for a URL validation
|
|
87
|
-
*
|
|
88
|
-
* @returns {RegExp} regular expression
|
|
89
|
-
*/
|
|
90
|
-
static url(): RegExp;
|
|
91
|
-
/**
|
|
92
|
-
* Method that provides regular expression for a social media link validation
|
|
93
|
-
*
|
|
94
|
-
* @param {string} social name of the social media
|
|
95
|
-
* @returns {RegExp} regular expression
|
|
96
|
-
*/
|
|
97
|
-
static socialMediaLink(social: string): RegExp;
|
|
98
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Abstract class that provides Regular Expression patterns for validation
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class Regex {
|
|
5
|
+
/**
|
|
6
|
+
* Method that provides regular expression for alphabetic character validation
|
|
7
|
+
*
|
|
8
|
+
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
9
|
+
* @returns {RegExp} regular expression
|
|
10
|
+
*/
|
|
11
|
+
static alpha(includeSpaces: boolean): RegExp;
|
|
12
|
+
/**
|
|
13
|
+
* Method that provides regular express for alpha-numeric character validation
|
|
14
|
+
*
|
|
15
|
+
* @param {boolean} includeSpaces flag to include space or not in the pattern
|
|
16
|
+
* @returns {RegExp} regular expression
|
|
17
|
+
*/
|
|
18
|
+
static alphaNumeric(includeSpaces: boolean): RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* Method that provides regular expression for numeric character validation
|
|
21
|
+
*
|
|
22
|
+
* @returns {RegExp} regular expression
|
|
23
|
+
*/
|
|
24
|
+
static numeric(): RegExp;
|
|
25
|
+
/**
|
|
26
|
+
* Method that provides regular expression for a value that contains a number validation
|
|
27
|
+
*
|
|
28
|
+
* @returns {RegExp} regular expression
|
|
29
|
+
*/
|
|
30
|
+
static hasNumber(): RegExp;
|
|
31
|
+
/**
|
|
32
|
+
* Method that provides regular expression for a value that contains special characters validation
|
|
33
|
+
*
|
|
34
|
+
* @returns {RegExp} regular expression
|
|
35
|
+
*/
|
|
36
|
+
static hasSpecialCharacter(): RegExp;
|
|
37
|
+
/**
|
|
38
|
+
* Method that provides regular expression for a value that is all upper case validation
|
|
39
|
+
*
|
|
40
|
+
* @returns {RegExp} regular expression
|
|
41
|
+
*/
|
|
42
|
+
static isAllUpperCase(): RegExp;
|
|
43
|
+
/**
|
|
44
|
+
* Method that provides regular expression for a value that contains upper case validation
|
|
45
|
+
*
|
|
46
|
+
* @returns {RegExp} regular expression
|
|
47
|
+
*/
|
|
48
|
+
static hasUpperCase(): RegExp;
|
|
49
|
+
/**
|
|
50
|
+
* Method that provides regular expression for a value that is all lower case validation
|
|
51
|
+
*
|
|
52
|
+
* @returns {RegExp} regular expression
|
|
53
|
+
*/
|
|
54
|
+
static isAllLowerCase(): RegExp;
|
|
55
|
+
/**
|
|
56
|
+
* Method that provides regular expression for a value that contains lower case validation
|
|
57
|
+
*
|
|
58
|
+
* @returns {RegExp} regular expression
|
|
59
|
+
*/
|
|
60
|
+
static hasLowerCase(): RegExp;
|
|
61
|
+
/**
|
|
62
|
+
* Method that provides regular expression for email address validation
|
|
63
|
+
*
|
|
64
|
+
* @returns {RegExp} regular expression
|
|
65
|
+
*/
|
|
66
|
+
static emailAddress(): RegExp;
|
|
67
|
+
/**
|
|
68
|
+
* Method that provides regular expression for a phone number validation (USA)
|
|
69
|
+
*
|
|
70
|
+
* @returns {RegExp} regular expression
|
|
71
|
+
*/
|
|
72
|
+
static phoneNumber(): RegExp;
|
|
73
|
+
/**
|
|
74
|
+
* Method that provides regular expression for a street validation
|
|
75
|
+
*
|
|
76
|
+
* @returns {RegExp} regular expression
|
|
77
|
+
*/
|
|
78
|
+
static street(): RegExp;
|
|
79
|
+
/**
|
|
80
|
+
* Method that provides regular expression for a time validation
|
|
81
|
+
*
|
|
82
|
+
* @returns {RegExp} regular expression
|
|
83
|
+
*/
|
|
84
|
+
static time(): RegExp;
|
|
85
|
+
/**
|
|
86
|
+
* Method that provides regular expression for a URL validation
|
|
87
|
+
*
|
|
88
|
+
* @returns {RegExp} regular expression
|
|
89
|
+
*/
|
|
90
|
+
static url(): RegExp;
|
|
91
|
+
/**
|
|
92
|
+
* Method that provides regular expression for a social media link validation
|
|
93
|
+
*
|
|
94
|
+
* @param {string} social name of the social media
|
|
95
|
+
* @returns {RegExp} regular expression
|
|
96
|
+
*/
|
|
97
|
+
static socialMediaLink(social: string): RegExp;
|
|
98
|
+
}
|