@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
2 lines (1 loc) • 581 B
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(o,c,t=!1)=>new Promise((a,i)=>{fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(c)}).then(function(n){n.status!==200&&i(n),t&&a(n.blob()),n.json().then(function(e){a(e)}).catch(()=>a(n.status))}).catch(function(n){i(n)})}),p=async(o,c={})=>{try{const t=await fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"}});if(!t.ok)throw t;return await t.json()}catch(t){throw t}};exports.get=p;exports.post=s;
;