@mll-lab/js-utils 2.20.1 → 2.21.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/dist/index.common.js +7 -7
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/predicates.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15379,8 +15379,14 @@ const EMAIL_REGEX =
|
|
|
15379
15379
|
const isEmail = function isEmail(value) {
|
|
15380
15380
|
return isString(value) && EMAIL_REGEX.test(value);
|
|
15381
15381
|
};
|
|
15382
|
+
const isLabId = function isLabId(value) {
|
|
15383
|
+
return isString(value) && /^\d{2}-\d{6}$/.test(value);
|
|
15384
|
+
};
|
|
15382
15385
|
const isOnlyDigits = function isOnlyDigits(value) {
|
|
15383
|
-
return isString(value) && /^\d+$/.test(value);
|
|
15386
|
+
return (isString(value) && /^\d+$/.test(value)) || Number.isInteger(value);
|
|
15387
|
+
};
|
|
15388
|
+
const isRackBarcode = function isRackBarcode(value) {
|
|
15389
|
+
return isString(value) && /^[A-Z]{2}\d{8}$/.test(value);
|
|
15384
15390
|
};
|
|
15385
15391
|
const isURL = function isURL(value) {
|
|
15386
15392
|
if (!isString(value)) {
|
|
@@ -15399,12 +15405,6 @@ const isURL = function isURL(value) {
|
|
|
15399
15405
|
const isWord = function isWord(value) {
|
|
15400
15406
|
return isString(value) && /^[\w-]+$/.test(value);
|
|
15401
15407
|
};
|
|
15402
|
-
const isLabId = function isLabId(value) {
|
|
15403
|
-
return isString(value) && /^\d{2}-\d{6}$/.test(value);
|
|
15404
|
-
};
|
|
15405
|
-
const isRackBarcode = function isRackBarcode(value) {
|
|
15406
|
-
return isString(value) && /^[A-Z]{2}\d{8}$/.test(value);
|
|
15407
|
-
};
|
|
15408
15408
|
|
|
15409
15409
|
/**
|
|
15410
15410
|
* Call an array of promises in order, waiting for each promise to resolve before calling the next.
|