@mll-lab/js-utils 2.21.0 → 2.22.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/README.md +2 -2
- package/dist/index.common.js +4 -1
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/predicates.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Shared JavaScript utilities of MLL
|
|
|
14
14
|
Just import the functions you need and call them, for example:
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
|
-
import {
|
|
17
|
+
import { isLabID } from '@mll-lab/js-utils';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
isLabID('obviously not');
|
|
20
20
|
```
|
package/dist/index.common.js
CHANGED
|
@@ -15379,9 +15379,11 @@ const EMAIL_REGEX =
|
|
|
15379
15379
|
const isEmail = function isEmail(value) {
|
|
15380
15380
|
return isString(value) && EMAIL_REGEX.test(value);
|
|
15381
15381
|
};
|
|
15382
|
-
const
|
|
15382
|
+
const isLabID = function isLabId(value) {
|
|
15383
15383
|
return isString(value) && /^\d{2}-\d{6}$/.test(value);
|
|
15384
15384
|
};
|
|
15385
|
+
/** @deprecated use isLabID */
|
|
15386
|
+
const isLabId = isLabID;
|
|
15385
15387
|
const isOnlyDigits = function isOnlyDigits(value) {
|
|
15386
15388
|
return (isString(value) && /^\d+$/.test(value)) || Number.isInteger(value);
|
|
15387
15389
|
};
|
|
@@ -15497,6 +15499,7 @@ exports.isBSNR = isBSNR;
|
|
|
15497
15499
|
exports.isEmail = isEmail;
|
|
15498
15500
|
exports.isEmptyArray = isEmptyArray;
|
|
15499
15501
|
exports.isFuture = isFuture;
|
|
15502
|
+
exports.isLabID = isLabID;
|
|
15500
15503
|
exports.isLabId = isLabId;
|
|
15501
15504
|
exports.isMobileDevice = isMobileDevice;
|
|
15502
15505
|
exports.isNonEmptyArray = isNonEmptyArray;
|