{"_id":"lxiv","_rev":"1740455","name":"lxiv","description":"A compact library to encode and decode base64 data.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"dcode","email":"dcode@dcode.io"}],"time":{"modified":"2026-11-18T01:53:42.000Z","created":"2014-07-12T15:22:03.168Z","0.2.0":"2014-07-12T15:22:03.168Z"},"users":{},"author":{"name":"Daniel Wirtz","email":"dcode@dcode.io"},"repository":{"type":"git","url":"https://github.com/dcodeIO/lxiv.git"},"versions":{"0.2.0":{"name":"lxiv","author":{"name":"Daniel Wirtz","email":"dcode@dcode.io"},"version":"0.2.0","description":"A compact library to encode and decode base64 data.","main":"index.js","repository":{"type":"git","url":"https://github.com/dcodeIO/lxiv.git"},"bugs":{"url":"https://github.com/dcodeIO/lxiv/issues"},"keywords":["encoding","base64"],"dependencies":{},"devDependencies":{"testjs":"~1","metascript":"~0","closurecompiler":"~1"},"license":"Apache-2.0","engines":{"node":">=0.8"},"scripts":{"build":"node node_modules/metascript/bin/metascript src/lxiv.js > dist/lxiv.js && node node_modules/metascript/bin/metascript src/lxiv-embeddable.js > dist/lxiv-embeddable.js","compile":"ccjs dist/lxiv.js --compilation_level=ADVANCED_OPTIMIZATIONS > dist/lxiv.min.js","test":"node tests/suite.js","make":"npm run-script build && npm run-script compile && npm test"},"homepage":"https://github.com/dcodeIO/lxiv","_id":"lxiv@0.2.0","_shasum":"1809cc0015214469b2055738f90c608d188c1a9b","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"dcode","email":"dcode@dcode.io"},"maintainers":[{"name":"dcode","email":"dcode@dcode.io"}],"dist":{"shasum":"1809cc0015214469b2055738f90c608d188c1a9b","tarball":"http://registry-npm.ywwl.com/lxiv/download/lxiv-0.2.0.tgz","integrity":"sha512-kZfRAqtw3M5iI0oe7sc3Xuo7BMVia5eDX7iodQqUM8cTUBuE0cAQsPXVOmxyD9a3ujAmgak3Dxw0f74aGGg2/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgN9t6e/6d1J7lenJeX3JYKOr0c38wSohqgpnY/YlJzAiA+V3IqqvFZhkAVurwtI8aNhm8poTNyjBhFjPR0e4Ya6g=="}],"size":9660,"noattachment":false,"key":"/lxiv/-/lxiv-0.2.0.tgz"},"publish_time":1405178523168,"_cnpm_publish_time":1405178523168}},"readme":"![lxiv - A compact library to encode and decode base64 data in JavaScript.](https://raw.github.com/dcodeIO/lxiv/master/lxiv.png)\r\n====\r\n**lxiv** is a compact library to encode and decode base64 data in JavaScript using arbitrary sources and destinations\r\nthrough the use of successively called functions, basically eliminating [memory overhead](https://github.com/dcodeIO/utfx/wiki#faq).\r\n\r\nAPI\r\n---\r\n\r\n### encode(src, dst)\r\n\r\nEncodes bytes to base64 char codes.\r\n\r\n| Parameter       | Type            | Description\r\n|-----------------|-----------------|---------------\r\n| src             | *function():(number &#124; null)* | Bytes source as a function returning the next byte respectively `null` if there are no more bytes left. \r\n| dst             | *function(number)* | Characters destination as a function successively called with each encoded char code. \r\n\r\n### decode(src, dst)\r\n\r\nDecodes base64 char codes to bytes.\r\n\r\n| Parameter       | Type            | Description\r\n|-----------------|-----------------|---------------\r\n| src             | *function():(number &#124; null)* | Characters source as a function returning the next char code respectively `null` if there are no more characters left. \r\n| dst             | *function(number)* | Bytes destination as a function successively called with the next byte. \r\n| **@throws**     | *Error*         | If a character code is invalid \r\n\r\n### test(str)\r\n\r\nTests if a string is valid base64.\r\n\r\n| Parameter       | Type            | Description\r\n|-----------------|-----------------|---------------\r\n| str             | *string*        | String to test \r\n| **@returns**    | *boolean*       | `true` if valid, otherwise `false` \r\n\r\nDownloads\r\n---------\r\n* [Distributions](https://github.com/dcodeIO/lxiv/tree/master/dist)\r\n\r\nLicense\r\n-------\r\nApache License, Version 2.0\r\n","_attachments":{},"homepage":"https://github.com/dcodeIO/lxiv","bugs":{"url":"https://github.com/dcodeIO/lxiv/issues"},"license":"Apache-2.0"}