@nopwdio/sdk-js
Version:
Nopwd JS SDK
2 lines (1 loc) • 358 B
JavaScript
var a=function(r){let t=new Uint8Array(r);return n(t)},n=function(r){let t="";for(let e of r)t+=String.fromCharCode(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},c=function(r){return r+=Array(5-r.length%4).join("="),r=r.replace(/\-/g,"+").replace(/\_/g,"/"),new Uint8Array([...atob(r)].map(t=>t.charCodeAt(0)))};export{a,c as b};