UNPKG

mand-mobile

Version:

A Vue.js 2.0 Mobile UI Toolkit

12 lines (9 loc) 482 B
import Vue from 'vue' // Development environment export const isProd = process.env.NODE_ENV === 'production' // Browser environment sniffing export const inBrowser = !Vue.prototype.$isServer || typeof window !== 'undefined' export const UA = inBrowser && window.navigator.userAgent.toLowerCase() export const isAndroid = UA && UA.indexOf('android') > 0 export const isIOS = UA && /iphone|ipad|ipod|ios/.test(UA) export const root = typeof window !== 'undefined' ? window : global