@mll-lab/js-utils 2.20.0 → 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 +18 -10
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist/predicates.d.ts +7 -4
- package/package.json +15 -9
package/dist/index.common.js
CHANGED
|
@@ -15264,6 +15264,11 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
15264
15264
|
});
|
|
15265
15265
|
}
|
|
15266
15266
|
|
|
15267
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
15268
|
+
var e = new Error(message);
|
|
15269
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
15270
|
+
};
|
|
15271
|
+
|
|
15267
15272
|
const GERMAN_THOUSAND_SEPARATOR = '.';
|
|
15268
15273
|
const GERMAN_DECIMAL_SEPARATOR = ',';
|
|
15269
15274
|
const ENGLISH_THOUSAND_SEPARATOR = ',';
|
|
@@ -15357,22 +15362,31 @@ const isAlphanumeric = function isAlphanumeric(value) {
|
|
|
15357
15362
|
return isString(value) && /^[A-Za-z0-9]+$/.test(value);
|
|
15358
15363
|
};
|
|
15359
15364
|
/**
|
|
15360
|
-
* BSNR (Betriebsstättennummer) ist eine
|
|
15361
|
-
*
|
|
15365
|
+
* Die BSNR (Betriebsstättennummer) ist eine neunstellige Zahl, die eine eindeutige Zuordnung
|
|
15366
|
+
* von Leistungen zu dem entsprechenden Ort der Leistungserbringung ermöglicht.
|
|
15367
|
+
* Die BSNR ist für alle vertrags(zahn)ärztlichen Leistungserbringer gültig
|
|
15362
15368
|
* und klar abzugrenzen vom Institutskennzeichen (IK-Nummer) eines Krankenhauses.
|
|
15369
|
+
*
|
|
15370
|
+
* https://reimbursement.institute/glossar/bsnr-betriebsstaettennummer
|
|
15363
15371
|
*/
|
|
15364
15372
|
const isBSNR = function isBSNR(value) {
|
|
15365
15373
|
return isString(value) && /^\d{9}$/.test(value);
|
|
15366
15374
|
};
|
|
15367
|
-
// Taken from https://emailregex.com
|
|
15368
15375
|
const EMAIL_REGEX =
|
|
15376
|
+
// Taken from https://emailregex.com
|
|
15369
15377
|
// eslint-disable-next-line no-useless-escape
|
|
15370
15378
|
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
15371
15379
|
const isEmail = function isEmail(value) {
|
|
15372
15380
|
return isString(value) && EMAIL_REGEX.test(value);
|
|
15373
15381
|
};
|
|
15382
|
+
const isLabId = function isLabId(value) {
|
|
15383
|
+
return isString(value) && /^\d{2}-\d{6}$/.test(value);
|
|
15384
|
+
};
|
|
15374
15385
|
const isOnlyDigits = function isOnlyDigits(value) {
|
|
15375
|
-
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);
|
|
15376
15390
|
};
|
|
15377
15391
|
const isURL = function isURL(value) {
|
|
15378
15392
|
if (!isString(value)) {
|
|
@@ -15391,12 +15405,6 @@ const isURL = function isURL(value) {
|
|
|
15391
15405
|
const isWord = function isWord(value) {
|
|
15392
15406
|
return isString(value) && /^[\w-]+$/.test(value);
|
|
15393
15407
|
};
|
|
15394
|
-
const isLabId = function isLabId(value) {
|
|
15395
|
-
return isString(value) && /^\d{2}-\d{6}$/.test(value);
|
|
15396
|
-
};
|
|
15397
|
-
const isRackBarcode = function isRackBarcode(value) {
|
|
15398
|
-
return isString(value) && /^[A-Z]{2}\d{8}$/.test(value);
|
|
15399
|
-
};
|
|
15400
15408
|
|
|
15401
15409
|
/**
|
|
15402
15410
|
* Call an array of promises in order, waiting for each promise to resolve before calling the next.
|