@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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './array';
2
2
  export * from './date';
3
+ export * from './device';
3
4
  export * from './error';
4
5
  export * from './germanNumber';
5
6
  export * from './number';
package/dist/index.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;