UNPKG

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) 465 B
import{create as e}from"./app.js";const r={},t=e=>"undefined"!=typeof window&&window.alert?window.alert(e):console.error(e);async function a(a){if(!a)throw Error("Attempt to create App instance with no configuration");const n=a.appName||"Instance"+(Object.keys(r).length+1);a.appName=n;try{const t=await e(a);return r[n]=t,t}catch(e){console.error(e),e instanceof Error&&e.message?t(e.message):t("Error creating map. Please try again later.")}}export{a as create};