1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
{"version":3,"file":"b64-lite.mjs","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":["atob","base64","Buffer","from","toString","btoa","byteString","String","prototype","charCodeAt","call","Error","toBase64","input","fromBase64","b64","toBuffer","Uint8Array"],"mappings":"AAAO,SAASA,EAAKC,UACZC,OAAOC,KAAKF,EAAQ,UAAUG,SAAS,UAEzC,SAASC,EAAKC,OACd,UAAYA,qBACXC,OAAOC,UAAUC,WAAWC,UAAW,GAAK,UACxC,IAAIC,MAAO,8GAGdT,OAAOC,KAAKG,EAAY,UAAUF,SAAS,UAE7C,SAASQ,EAASC,UAChBX,OAAOC,KAAKU,GAAOT,SAAS,UAE9B,SAASU,EAAWC,UAClBb,OAAOC,KAAKY,EAAK,UAAUX,WAE7B,SAASY,EAASD,UAChB,IAAIE,WAAWf,OAAOC,KAAKY,EAAK"} |