@scaleway/regex 2.1.0 → 2.2.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 +9 -0
- package/dist/index.browser.js +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 2.2.0 (2022-01-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add alphaLower and basicDomain regex ([#600](https://github.com/scaleway/scaleway-lib/issues/600)) ([418bda9](https://github.com/scaleway/scaleway-lib/commit/418bda9db7c3c342565e01433461d78079bb1b76))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## 2.1.0 (2021-11-23)
|
|
7
16
|
|
|
8
17
|
|
package/dist/index.browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const alpha = /^[a-zA-Z]*$/;
|
|
2
|
+
const alphaLower = /^[a-z]+$/;
|
|
2
3
|
const alphanum = /^[a-zA-Z0-9]*$/;
|
|
3
4
|
const alphanumdash = /^[a-zA-Z0-9-]*$/;
|
|
4
5
|
const alphanumdashdots = /^[a-zA-Z0-9-.]*$/;
|
|
@@ -15,6 +16,7 @@ const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/; // eslint-disable-next-
|
|
|
15
16
|
|
|
16
17
|
const ascii = /^[\x00-\x7F]+$/;
|
|
17
18
|
const backupKey = /^[A-Z0-9]{32}$/;
|
|
19
|
+
const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
|
|
18
20
|
const cron = /^[0-9,/*-]+$/;
|
|
19
21
|
const digits = /^[0-9]*$/;
|
|
20
22
|
const macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; // Used by W3C
|
|
@@ -27,4 +29,4 @@ const sixDigitsCode = /^[0-9]{6}$/;
|
|
|
27
29
|
const url = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/;
|
|
28
30
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
29
31
|
|
|
30
|
-
export { absoluteLinuxPath, alpha, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
|
32
|
+
export { absoluteLinuxPath, alpha, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, basicDomain, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const alpha: RegExp;
|
|
2
|
+
declare const alphaLower: RegExp;
|
|
2
3
|
declare const alphanum: RegExp;
|
|
3
4
|
declare const alphanumdash: RegExp;
|
|
4
5
|
declare const alphanumdashdots: RegExp;
|
|
@@ -14,6 +15,7 @@ declare const alphanumUnderscoreDollarDash: RegExp;
|
|
|
14
15
|
declare const absoluteLinuxPath: RegExp;
|
|
15
16
|
declare const ascii: RegExp;
|
|
16
17
|
declare const backupKey: RegExp;
|
|
18
|
+
declare const basicDomain: RegExp;
|
|
17
19
|
declare const cron: RegExp;
|
|
18
20
|
declare const digits: RegExp;
|
|
19
21
|
declare const macAddress: RegExp;
|
|
@@ -25,4 +27,4 @@ declare const sixDigitsCode: RegExp;
|
|
|
25
27
|
declare const url: RegExp;
|
|
26
28
|
declare const hexadecimal: RegExp;
|
|
27
29
|
|
|
28
|
-
export { absoluteLinuxPath, alpha, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
|
30
|
+
export { absoluteLinuxPath, alpha, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, basicDomain, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const alpha = /^[a-zA-Z]*$/;
|
|
2
|
+
const alphaLower = /^[a-z]+$/;
|
|
2
3
|
const alphanum = /^[a-zA-Z0-9]*$/;
|
|
3
4
|
const alphanumdash = /^[a-zA-Z0-9-]*$/;
|
|
4
5
|
const alphanumdashdots = /^[a-zA-Z0-9-.]*$/;
|
|
@@ -15,6 +16,7 @@ const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/; // eslint-disable-next-
|
|
|
15
16
|
|
|
16
17
|
const ascii = /^[\x00-\x7F]+$/;
|
|
17
18
|
const backupKey = /^[A-Z0-9]{32}$/;
|
|
19
|
+
const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
|
|
18
20
|
const cron = /^[0-9,/*-]+$/;
|
|
19
21
|
const digits = /^[0-9]*$/;
|
|
20
22
|
const macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; // Used by W3C
|
|
@@ -27,4 +29,4 @@ const sixDigitsCode = /^[0-9]{6}$/;
|
|
|
27
29
|
const url = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/;
|
|
28
30
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
29
31
|
|
|
30
|
-
export { absoluteLinuxPath, alpha, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
|
32
|
+
export { absoluteLinuxPath, alpha, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdots, ascii, backupKey, basicDomain, cron, digits, email, fourDigitsCode, hexadecimal, macAddress, phone, sixDigitsCode, spaces, url };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/regex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A small utility to use regex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"directory": "packages/regex"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "2d1e948a9304197df015bc1f1734f94f36db671d"
|
|
22
22
|
}
|