@mll-lab/js-utils 2.20.1 → 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/dist/index.js CHANGED
@@ -15379,8 +15379,16 @@ 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
+ };
15385
+ /** @deprecated use isLabID */
15386
+ const isLabId = isLabID;
15382
15387
  const isOnlyDigits = function isOnlyDigits(value) {
15383
- return isString(value) && /^\d+$/.test(value);
15388
+ return (isString(value) && /^\d+$/.test(value)) || Number.isInteger(value);
15389
+ };
15390
+ const isRackBarcode = function isRackBarcode(value) {
15391
+ return isString(value) && /^[A-Z]{2}\d{8}$/.test(value);
15384
15392
  };
15385
15393
  const isURL = function isURL(value) {
15386
15394
  if (!isString(value)) {
@@ -15399,12 +15407,6 @@ const isURL = function isURL(value) {
15399
15407
  const isWord = function isWord(value) {
15400
15408
  return isString(value) && /^[\w-]+$/.test(value);
15401
15409
  };
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
15410
 
15409
15411
  /**
15410
15412
  * Call an array of promises in order, waiting for each promise to resolve before calling the next.
@@ -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;