@mll-lab/js-utils 2.11.0 → 2.12.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/device.d.ts +4 -0
- package/dist/device.test.d.ts +1 -0
- package/dist/index.common.js +9 -0
- package/dist/index.common.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/device.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.common.js
CHANGED
|
@@ -15121,6 +15121,14 @@ function formatDotlessDate(date) {
|
|
|
15121
15121
|
return format(date, DOTLESS_DATE_FORMAT, { locale: de$1 });
|
|
15122
15122
|
}
|
|
15123
15123
|
|
|
15124
|
+
/**
|
|
15125
|
+
* Detects if a mobile device is used
|
|
15126
|
+
*/
|
|
15127
|
+
function isMobileDevice() {
|
|
15128
|
+
const userAgent = typeof window.navigator === 'undefined' ? '' : navigator.userAgent;
|
|
15129
|
+
return Boolean(userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i));
|
|
15130
|
+
}
|
|
15131
|
+
|
|
15124
15132
|
/**
|
|
15125
15133
|
* Extract a message from a caught error.
|
|
15126
15134
|
*
|
|
@@ -15321,6 +15329,7 @@ exports.isBSNR = isBSNR;
|
|
|
15321
15329
|
exports.isEmail = isEmail;
|
|
15322
15330
|
exports.isFuture = isFuture;
|
|
15323
15331
|
exports.isLabId = isLabId;
|
|
15332
|
+
exports.isMobileDevice = isMobileDevice;
|
|
15324
15333
|
exports.isNonEmptyArray = isNonEmptyArray;
|
|
15325
15334
|
exports.isNotNullish = isNotNullish;
|
|
15326
15335
|
exports.isOnlyDigits = isOnlyDigits;
|