import { getUserAgent } from '../utils/request'; /** * @function isMobile * @description Returns if the current device is mobile * @param {Object} request Http request * @return {Boolean} Is mobile or not */ export const isMobile = (request) => { const userAgent = getUserAgent(request); if (/Mobi/.test(userAgent)) { return true; } return false; };