git ssb

0+

Rômulo Alves / plainbudget-next



Tree: bd4bfedca4b0bd09f8505a662478749de1fe663f

Files: bd4bfedca4b0bd09f8505a662478749de1fe663f / utils / mobile.js

370 bytesRaw
1import { getUserAgent } from '../utils/request';
2
3/**
4 * @function isMobile
5 * @description Returns if the current device is mobile
6 * @param {Object} request Http request
7 * @return {Boolean} Is mobile or not
8 */
9export const isMobile = (request) => {
10 const userAgent = getUserAgent(request);
11
12 if (/Mobi/.test(userAgent)) {
13 return true;
14 }
15
16 return false;
17};

Built with git-ssb-web