@mll-lab/js-utils 2.21.0 → 2.23.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 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 { isLabId } from '@mll-lab/js-utils';
17
+ import { isLabID } from '@mll-lab/js-utils';
18
18
 
19
- isLabId('obviously not');
19
+ isLabID('obviously not');
20
20
  ```
@@ -15357,6 +15357,10 @@ function isString(value) {
15357
15357
  function isNotNullish(value) {
15358
15358
  return value != null;
15359
15359
  }
15360
+ function isArrayOfStrings(value) {
15361
+ return (value instanceof Array &&
15362
+ value.every((record) => typeof record === 'string'));
15363
+ }
15360
15364
 
15361
15365
  const isAlphanumeric = function isAlphanumeric(value) {
15362
15366
  return isString(value) && /^[A-Za-z0-9]+$/.test(value);
@@ -15379,9 +15383,11 @@ const EMAIL_REGEX =
15379
15383
  const isEmail = function isEmail(value) {
15380
15384
  return isString(value) && EMAIL_REGEX.test(value);
15381
15385
  };
15382
- const isLabId = function isLabId(value) {
15386
+ const isLabID = function isLabId(value) {
15383
15387
  return isString(value) && /^\d{2}-\d{6}$/.test(value);
15384
15388
  };
15389
+ /** @deprecated use isLabID */
15390
+ const isLabId = isLabID;
15385
15391
  const isOnlyDigits = function isOnlyDigits(value) {
15386
15392
  return (isString(value) && /^\d+$/.test(value)) || Number.isInteger(value);
15387
15393
  };
@@ -15493,10 +15499,12 @@ exports.formatSecondlessDateTime = formatSecondlessDateTime;
15493
15499
  exports.includesIgnoreCase = includesIgnoreCase;
15494
15500
  exports.insertIf = insertIf;
15495
15501
  exports.isAlphanumeric = isAlphanumeric;
15502
+ exports.isArrayOfStrings = isArrayOfStrings;
15496
15503
  exports.isBSNR = isBSNR;
15497
15504
  exports.isEmail = isEmail;
15498
15505
  exports.isEmptyArray = isEmptyArray;
15499
15506
  exports.isFuture = isFuture;
15507
+ exports.isLabID = isLabID;
15500
15508
  exports.isLabId = isLabId;
15501
15509
  exports.isMobileDevice = isMobileDevice;
15502
15510
  exports.isNonEmptyArray = isNonEmptyArray;