UNPKG

wowok

Version:

Wowok Blockchain TypeScript API

1 lines 346 B
export function fromBase64(a){return Uint8Array['from'](atob(a),b=>b['charCodeAt'](0x0));}const CHUNK_SIZE=0x2000;export function toBase64(a){if(a['length']<CHUNK_SIZE)return btoa(String['fromCharCode'](...a));let b='';for(var c=0x0;c<a['length'];c+=CHUNK_SIZE){const d=a['slice'](c,c+CHUNK_SIZE);b+=String['fromCharCode'](...d);}return btoa(b);}