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) • 376 B
JavaScript
function i(i){const o=i.config.desktopViewMinWidth||0,s="undefined"!=typeof window,e={isBrowser:s,isMobile:()=>s&&innerWidth<o,isLocalhost:()=>location.host.startsWith("localhost")||location.host.startsWith("127.0.0.1"),isDesktop:()=>s&&!e.isMobile()};return s&&window.addEventListener("resize",(()=>i.bus.send("env/resize",{isMobile:e.isMobile()}))),e}export{i as buildEnv};