UNPKG

nbl

Version:

21 lines (19 loc) 598 B
import {set,get} from 'idb-keyval' import { v4 as uuidv4} from "uuid"; import httpreq from './http/http'; const uid=uuidv4() const axios = require('axios'); const xhr = new XMLHttpRequest(); function initialize(appid: string,appurl:string) { set('data',{uid,appid,appurl}) get('data').then(console.log) return appid; } //async function base(method:string,url:string,text:string) { //var data= await httpreq(method,url,text) //return data; function base(method:string,URL:string) { httpreq(method, URL).then(res=>{ return res}); } export default base;