jstd-web/node_modules/@uppy/utils/lib/isMobileDevice.js

17 lines
377 B
JavaScript
Raw Normal View History

2025-11-25 15:23:22 +08:00
"use strict";
function isMobileDevice() {
if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.match(/Mobi/)) {
return true;
}
return false;
}
/**
* Checks if current device reports itself as mobile.
* Very simple, not very reliable.
*
* @returns {boolean}
*/
module.exports = isMobileDevice;