1 line
1.2 KiB
Plaintext
1 line
1.2 KiB
Plaintext
{"version":3,"file":"b64-lite.js","sources":["../node.js"],"sourcesContent":["export function atob(base64) {\n return Buffer.from(base64, 'base64').toString('binary')\n}\nexport function btoa(byteString) {\n for (let byte of byteString) {\n if (String.prototype.charCodeAt.call(byte, 0) > 255) {\n throw new Error(`Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.`)\n }\n }\n return Buffer.from(byteString, 'binary').toString('base64')\n}\nexport function toBase64(input) {\n return Buffer.from(input).toString('base64')\n}\nexport function fromBase64(b64) {\n return Buffer.from(b64, 'base64').toString()\n}\nexport function toBuffer(b64) {\n return new Uint8Array(Buffer.from(b64, 'base64'))\n}\n"],"names":["base64","Buffer","from","toString","byteString","String","prototype","charCodeAt","call","Error","input","b64","Uint8Array"],"mappings":"aAAO,SAAcA,UACZC,OAAOC,KAAKF,EAAQ,UAAUG,SAAS,wBAEzC,SAAcC,OACd,UAAYA,qBACXC,OAAOC,UAAUC,WAAWC,UAAW,GAAK,UACxC,IAAIC,MAAO,8GAGdR,OAAOC,KAAKE,EAAY,UAAUD,SAAS,4BAE7C,SAAkBO,UAChBT,OAAOC,KAAKQ,GAAOP,SAAS,8BAE9B,SAAoBQ,UAClBV,OAAOC,KAAKS,EAAK,UAAUR,6BAE7B,SAAkBQ,UAChB,IAAIC,WAAWX,OAAOC,KAAKS,EAAK"} |