atriusmaps-node-sdk
Version:
This project provides an API to Atrius Personal Wayfinder maps within a Node environment. See the README.md for more information
2 lines (1 loc) • 452 B
JavaScript
function o(o){const i=o.config.desktopViewMinWidth||0,t="undefined"!=typeof window,s=t&&("ontouchstart"in window||navigator.maxTouchPoints>0),n=()=>t&&innerWidth<i,e={isBrowser:t,isMobile:()=>n(),isLocalhost:()=>location.host.startsWith("localhost")||location.host.startsWith("127.0.0.1"),isDesktop:()=>t&&!n(),supportsTouch:s};return t&&window.addEventListener("resize",(()=>o.bus.send("env/resize",{isMobile:e.isMobile()}))),e}export{o as buildEnv};