1 export default function () { 2 const json = { 3 userAgent: navigator.userAgent.toLowerCase(), 4 isAndroid: Boolean(navigator.userAgent.match(/android/ig)), 5 isIphone: Boolean(navigator.userAgent.match(/iphone|ipod/ig)), 6 isIpad: Boolean(navigator.userAgent.match(/ipad/ig)), 7 isWeixin: Boolean(navigator.userAgent.match(/MicroMessenger/ig)), 8 }; 9 return json; 10 }