@mll-lab/js-utils 2.34.0 → 2.35.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 +14 -9
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/dist/typeGuards.d.ts +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16052,15 +16052,6 @@ function pluralize(amount, singular, plural) {
|
|
|
16052
16052
|
return plural;
|
|
16053
16053
|
}
|
|
16054
16054
|
|
|
16055
|
-
function isString(value) {
|
|
16056
|
-
return typeof value === 'string';
|
|
16057
|
-
}
|
|
16058
|
-
function isNonEmptyString(value) {
|
|
16059
|
-
return isString(value) && value !== '';
|
|
16060
|
-
}
|
|
16061
|
-
function isNotNullish(value) {
|
|
16062
|
-
return value != null;
|
|
16063
|
-
}
|
|
16064
16055
|
function isArrayOfStrings(value) {
|
|
16065
16056
|
return value instanceof Array && value.every(isString);
|
|
16066
16057
|
}
|
|
@@ -16070,6 +16061,19 @@ function isEmptyObject(value) {
|
|
|
16070
16061
|
!(value instanceof Array) &&
|
|
16071
16062
|
Object.keys(value).length === 0);
|
|
16072
16063
|
}
|
|
16064
|
+
function isNonEmptyString(value) {
|
|
16065
|
+
return isString(value) && value !== '';
|
|
16066
|
+
}
|
|
16067
|
+
function isNotNullish(value) {
|
|
16068
|
+
return value != null;
|
|
16069
|
+
}
|
|
16070
|
+
function isString(value) {
|
|
16071
|
+
return typeof value === 'string';
|
|
16072
|
+
}
|
|
16073
|
+
/** https://developer.mozilla.org/en-US/docs/Glossary/Falsy */
|
|
16074
|
+
function isTruthy(value) {
|
|
16075
|
+
return Boolean(value);
|
|
16076
|
+
}
|
|
16073
16077
|
|
|
16074
16078
|
const isAlphanumeric = function isAlphanumeric(value) {
|
|
16075
16079
|
return isString(value) && /^[A-Za-z0-9]+$/.test(value);
|
|
@@ -16230,6 +16234,7 @@ exports.isRackBarcode = isRackBarcode;
|
|
|
16230
16234
|
exports.isString = isString;
|
|
16231
16235
|
exports.isTimeWithHoursAndMinutes = isTimeWithHoursAndMinutes;
|
|
16232
16236
|
exports.isToday = isToday;
|
|
16237
|
+
exports.isTruthy = isTruthy;
|
|
16233
16238
|
exports.isURL = isURL;
|
|
16234
16239
|
exports.isValidGermanDate = isValidGermanDate;
|
|
16235
16240
|
exports.isWord = isWord;
|