@scaleway/regex 3.1.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/index.d.ts +15 -14
- package/dist/index.js +15 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1442](https://github.com/scaleway/scaleway-lib/pull/1442) [`c39764e`](https://github.com/scaleway/scaleway-lib/commit/c39764e869fcce3471d6c2c4e35272c86ad24f90) Thanks [@vincentaudebert](https://github.com/vincentaudebert)! - Rename few regex and camelcase all of them for more consistency. Also creates alphanumDashUnderscoreDots.
|
|
8
|
+
|
|
9
|
+
Here is the full list of changes:
|
|
10
|
+
|
|
11
|
+
- alphaLower -> alphaLowercase
|
|
12
|
+
- alphanumdash -> alphanumDash
|
|
13
|
+
- alphanumdashdots -> alphanumDashDots
|
|
14
|
+
- alphanumdashdotsorempty -> alphanumDashDotsOrEmpty
|
|
15
|
+
- alphanumdashdotsspaces -> alphanumDashDotsSpaces
|
|
16
|
+
- alphanumdashunderscore -> alphanumDashUnderscore
|
|
17
|
+
- alphanumdashunderscoredotsspacesparenthesis -> alphanumDashUnderscoreDotsSpacesParenthesis
|
|
18
|
+
- alphanumdashorempty -> alphanumDashOrEmpty
|
|
19
|
+
- alphanumdashspaces -> alphanumDashSpaces
|
|
20
|
+
- alphanumdots -> alphanumDots
|
|
21
|
+
- alphanumdashLowercase -> alphanumDashLowercase
|
|
22
|
+
- alphanumSpacesDotsUnderscoreDash -> alphanumDashUnderscoreDotsSpaces
|
|
23
|
+
- alphanumUnderscoreDash -> alphanumDashUnderscore
|
|
24
|
+
- alphanumUnderscoreDollarDash -> alphanumDashUnderscoreDollar
|
|
25
|
+
|
|
26
|
+
## 3.2.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- [#1393](https://github.com/scaleway/scaleway-lib/pull/1393) [`e3561b6`](https://github.com/scaleway/scaleway-lib/commit/e3561b680f1d9868717656be02364951948c2ee9) Thanks [@QuiiBz](https://github.com/QuiiBz)! - Add alphanumdashunderscore regex
|
|
31
|
+
|
|
3
32
|
## 3.1.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
declare const accessKeyRegex: RegExp;
|
|
2
2
|
declare const alpha: RegExp;
|
|
3
|
-
declare const
|
|
3
|
+
declare const alphaLowercase: RegExp;
|
|
4
4
|
declare const alphanum: RegExp;
|
|
5
5
|
declare const alphaDashes: RegExp;
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
6
|
+
declare const alphanumDash: RegExp;
|
|
7
|
+
declare const alphanumDashDots: RegExp;
|
|
8
|
+
declare const alphanumDashDotsOrEmpty: RegExp;
|
|
9
|
+
declare const alphanumDashDotsSpaces: RegExp;
|
|
10
|
+
declare const alphanumDashLowercase: RegExp;
|
|
11
|
+
declare const alphanumDashSpaces: RegExp;
|
|
12
|
+
declare const alphanumDashOrEmpty: RegExp;
|
|
13
|
+
declare const alphanumDashUnderscoreDots: RegExp;
|
|
14
|
+
declare const alphanumDashUnderscore: RegExp;
|
|
15
|
+
declare const alphanumDashUnderscoreDotsSpacesParenthesis: RegExp;
|
|
16
|
+
declare const alphanumDashUnderscoreDotsSpaces: RegExp;
|
|
17
|
+
declare const alphanumDashUnderscoreDollar: RegExp;
|
|
18
|
+
declare const alphanumDots: RegExp;
|
|
14
19
|
declare const alphanumLowercase: RegExp;
|
|
15
|
-
declare const alphanumdashLowercase: RegExp;
|
|
16
|
-
declare const alphanumSpacesDotsUnderscoreDash: RegExp;
|
|
17
|
-
declare const alphanumUnderscoreDash: RegExp;
|
|
18
|
-
declare const alphanumUnderscoreDollarDash: RegExp;
|
|
19
20
|
declare const absoluteLinuxPath: RegExp;
|
|
20
21
|
declare const ascii: RegExp;
|
|
21
22
|
declare const backupKey: RegExp;
|
|
@@ -42,4 +43,4 @@ declare const ipv6Cidr: RegExp;
|
|
|
42
43
|
declare const reverseDNS: RegExp;
|
|
43
44
|
declare const dashedIpv4: RegExp;
|
|
44
45
|
|
|
45
|
-
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes,
|
|
46
|
+
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLowercase, alphanum, alphanumDash, alphanumDashDots, alphanumDashDotsOrEmpty, alphanumDashDotsSpaces, alphanumDashLowercase, alphanumDashOrEmpty, alphanumDashSpaces, alphanumDashUnderscore, alphanumDashUnderscoreDollar, alphanumDashUnderscoreDots, alphanumDashUnderscoreDotsSpaces, alphanumDashUnderscoreDotsSpacesParenthesis, alphanumDots, alphanumLowercase, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
const accessKeyRegex = /^SCW[A-Z0-9]{17}$/i;
|
|
2
2
|
const alpha = /^[a-zA-Z]*$/;
|
|
3
|
-
const
|
|
3
|
+
const alphaLowercase = /^[a-z]+$/;
|
|
4
4
|
const alphanum = /^[a-zA-Z0-9]*$/;
|
|
5
5
|
const alphaDashes = /^[a-zA-Z-]*$/;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
6
|
+
const alphanumDash = /^[a-zA-Z0-9-]*$/;
|
|
7
|
+
const alphanumDashDots = /^[a-zA-Z0-9-.]*$/;
|
|
8
|
+
const alphanumDashDotsOrEmpty = /^$|^[a-zA-Z0-9-.]*$/;
|
|
9
|
+
const alphanumDashDotsSpaces = /^[a-zA-Z0-9-.\s]*$/;
|
|
10
|
+
const alphanumDashLowercase = /^[a-z0-9-]+$/;
|
|
11
|
+
const alphanumDashSpaces = /^[a-zA-Z0-9-\s]*$/;
|
|
12
|
+
const alphanumDashOrEmpty = /^$|^[a-zA-Z0-9-]*$/;
|
|
13
|
+
const alphanumDashUnderscoreDots = /^[a-zA-Z0-9-._]*$/;
|
|
14
|
+
const alphanumDashUnderscore = /^[a-zA-Z0-9-_]*$/;
|
|
15
|
+
const alphanumDashUnderscoreDotsSpacesParenthesis = /^[a-zA-Z0-9-_.()\s]*$/;
|
|
16
|
+
const alphanumDashUnderscoreDotsSpaces = /^[a-zA-Z0-9-.\s_]*$/;
|
|
17
|
+
const alphanumDashUnderscoreDollar = /^[a-zA-Z0-9_$-]*$/;
|
|
18
|
+
const alphanumDots = /^[a-zA-Z0-9.]*$/;
|
|
14
19
|
const alphanumLowercase = /^[a-z0-9]+$/;
|
|
15
|
-
const alphanumdashLowercase = /^[a-z0-9-]+$/;
|
|
16
|
-
const alphanumSpacesDotsUnderscoreDash = /^[a-zA-Z0-9-.\s_]*$/;
|
|
17
|
-
const alphanumUnderscoreDash = /^[a-zA-Z0-9_-]*$/;
|
|
18
|
-
const alphanumUnderscoreDollarDash = /^[a-zA-Z0-9_$-]*$/;
|
|
19
20
|
const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/;
|
|
20
21
|
const ascii = /^[\x00-\x7F]+$/;
|
|
21
22
|
const backupKey = /^[A-Z0-9]{32}$/;
|
|
@@ -58,4 +59,4 @@ const ipv6Cidr = new RegExp(`^${cidrv6}$`);
|
|
|
58
59
|
const reverseDNS = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+(\.)$/;
|
|
59
60
|
const dashedIpv4 = /(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(-(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/;
|
|
60
61
|
|
|
61
|
-
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes,
|
|
62
|
+
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLowercase, alphanum, alphanumDash, alphanumDashDots, alphanumDashDotsOrEmpty, alphanumDashDotsSpaces, alphanumDashLowercase, alphanumDashOrEmpty, alphanumDashSpaces, alphanumDashUnderscore, alphanumDashUnderscoreDollar, alphanumDashUnderscoreDots, alphanumDashUnderscoreDotsSpaces, alphanumDashUnderscoreDotsSpacesParenthesis, alphanumDots, alphanumLowercase, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|