{"_id":"base64-img","_rev":"24-89de793373035d3e3dd09ca8883b823a","name":"base64-img","description":"Convert img or svg to base64, or convert base64 to img","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"base64-img","version":"1.0.0","description":"Convert img to base64, or convert base64 to img","main":"base64-img.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/douzi8/base64-img.git"},"keywords":["base64","img","image","img base64"],"author":{"name":"douzi","email":"liaowei08@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/douzi8/base64-img/issues"},"homepage":"https://github.com/douzi8/base64-img","dependencies":{"file-system":"^2.0.0"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.10.0"},"gitHead":"631b6df4576f59b772cf74640c0c4c0f9ea84051","_id":"base64-img@1.0.0","_shasum":"a4c854b6f72824cab1fb06a88399b9b4fec645a7","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"douzi","email":"liaowei08@gmail.com"},"maintainers":[{"name":"douzi","email":"liaowei08@gmail.com"}],"dist":{"shasum":"a4c854b6f72824cab1fb06a88399b9b4fec645a7","tarball":"https://registry.npmjs.org/base64-img/-/base64-img-1.0.0.tgz","integrity":"sha512-5ngScmyjdOUddVX7ViGrMALgHyJfAU1H08VNLpU5zW+sOulfMqrIiOn1EH1Gz/GCMJQ0Lsc1Mahgtzx/QucG8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/wynie7UuLkpOu8VxJFPsgYLu9FZFqSOVsQwplvcN5AIgKUFYVvwyGUblbNL9bQmNxsTFOd6oCAk3y+pWU6Gc8g8="}]},"directories":{}},"1.0.1":{"name":"base64-img","version":"1.0.1","description":"Convert img to base64, or convert base64 to img","main":"base64-img.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/douzi8/base64-img.git"},"keywords":["base64","img","image","img base64"],"author":{"name":"douzi","email":"liaowei08@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/douzi8/base64-img/issues"},"homepage":"https://github.com/douzi8/base64-img","dependencies":{"file-system":"^2.1.0"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.10.0"},"gitHead":"e336d8905a411012f58c9bde6cac484a01468810","_id":"base64-img@1.0.1","_shasum":"47bbe313bbaae107816bd19e72ffa942af33e95e","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"douzi","email":"liaowei08@gmail.com"},"maintainers":[{"name":"douzi","email":"liaowei08@gmail.com"}],"dist":{"shasum":"47bbe313bbaae107816bd19e72ffa942af33e95e","tarball":"https://registry.npmjs.org/base64-img/-/base64-img-1.0.1.tgz","integrity":"sha512-8NNCrzpLklVsxO1G3YOPTAE0vtMbiyTEU8uBRphvb9PnzlGNiPbmOz2KvNdOcchDD6AdFq3OiFfq1RALIrhNzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlNfoWZXd+Sb7v91C8YGCglXX5USTyGccDNDNIZm1x6AIhAPPlcANpclX8G4H6/Cfig3/N6LKL2ZbJZom4+RiCwlp2"}]},"directories":{}},"1.0.3":{"name":"base64-img","version":"1.0.3","description":"Convert img to base64, or convert base64 to img","main":"base64-img.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/douzi8/base64-img.git"},"keywords":["base64","img","image","img base64"],"author":{"name":"douzi","email":"liaowei08@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/douzi8/base64-img/issues"},"homepage":"https://github.com/douzi8/base64-img","dependencies":{"ajax-request":"^1.2.0","file-system":"^2.1.0"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.10.0"},"gitHead":"44cd228b37e25a18e93e99a3cb2ab0c56a3a8c2d","_id":"base64-img@1.0.3","_shasum":"a8c0284900047103421e1f9e0214011333866806","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"douzi","email":"liaowei08@gmail.com"},"maintainers":[{"name":"douzi","email":"liaowei08@gmail.com"}],"dist":{"shasum":"a8c0284900047103421e1f9e0214011333866806","tarball":"https://registry.npmjs.org/base64-img/-/base64-img-1.0.3.tgz","integrity":"sha512-xRHBtp9Uw4GGvQxZxrbiIgHHLAlSGbwjHmvC7tYJXx87+9mCK76TV/otmrX/Qyj0buy5Bg9UMg8NGHnl0CFadg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkb3UOtQ8jF9sMVNfTt+p7vCKI/PY11XnqgChsbYFXFgIhAIihOWvNzDAPGpDPzuNZG8XEy7g3d0wP7Txk2cinwZuH"}]},"directories":{}},"1.0.4":{"name":"base64-img","version":"1.0.4","description":"Convert img or svg to base64, or convert base64 to img","main":"base64-img.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/douzi8/base64-img.git"},"keywords":["base64","img","image","img base64","svg"],"author":{"name":"douzi","email":"liaowei08@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/douzi8/base64-img/issues"},"homepage":"https://github.com/douzi8/base64-img","dependencies":{"ajax-request":"^1.2.0","file-system":"^2.1.0"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-jshint":"^0.10.0"},"gitHead":"28af7acdc67543067c882125183314471a88435e","_id":"base64-img@1.0.4","_shasum":"3e22d55d6c74a24553d840d2b1bc12a7db078d35","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"douzi","email":"liaowei@lechebang.com"},"dist":{"shasum":"3e22d55d6c74a24553d840d2b1bc12a7db078d35","tarball":"https://registry.npmjs.org/base64-img/-/base64-img-1.0.4.tgz","fileCount":8,"unpackedSize":11307,"integrity":"sha512-5RVat9C4bkht6kf4nrQy5gDhiLPs6Iq2sptiR8C6DV0yQ+oeo+oydDFEUgbBAW2yTwQNkthtOlAPG50gjUHaTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCagzatHKuZx7Rq0L/mz2joFHUbXahIvOHEsYvLd6PtBwIgbYifaefjwaMg4PcQOWzza7+cAGsftFX9uQAbpr7zZII="}]},"maintainers":[{"name":"douzi","email":"liaowei08@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/base64-img_1.0.4_1518522528479_0.6644234128405551"},"_hasShrinkwrap":false}},"readme":"# base64-img\nConvert img to base64, or convert base64 to img\n```js\nvar base64Img = require('base64-img');\n```\n## install\n```\nnpm install base64-img --save\n```\n## test\n```\nmocha\n```\n## API\n### .base64(filename, callback)\nConvert image file to image base64 data\n* {string} ``filename`` required  \nThe image path\n* {function} ``callback(err, data)`` required  \nCallback with image base64 data\n```js\nbase64Img.base64('path/demo.png', function(err, data) {})\n```\n\n### .base64Sync(filename)\nThe api same as base64, but it's synchronous \n```js\nvar data = base64Img.base64Sync('path/demo.png');\nvar data2 = base64Img.base64Sync('path/demo.svg');\n```\n\n### .requestBase64(url, callback)\n* {string} ``url`` required\n* {function} ``callback(err, res, body)`` required  \nCallback with http request\n```js\nvar url = 'http://../demo.png';\nbase64Img.requestBase64(url, function(err, res, body) {\n  \n});\n```\n\n### .img(data, destpath, name, callback)\nConvert image base64 data to image\n* {string} ``data`` required  \nImage base64 data\n* {string} ``destpath`` required  \nDest path, if the destpath is root, pass empty string\n* {string} ``name`` required  \nThe image's filename\n* {function} ``callback(err, filepath)`` required\n```js\nbase64Img.img('data:image/png;base64,...', 'dest', '1', function(err, filepath) {});\n```\n\n### .imgSync(data, destpath, name)\nThe api same as img, but it's synchronous\n```js\nvar filepath = base64Img.imgSync('data:image/png;base64,...', '', '2');\n```","maintainers":[{"name":"douzi","email":"liaowei08@gmail.com"}],"time":{"modified":"2022-06-13T04:18:00.464Z","created":"2015-03-02T06:16:38.942Z","1.0.0":"2015-03-02T06:16:38.942Z","1.0.1":"2015-03-02T11:53:08.307Z","1.0.3":"2015-03-25T02:57:49.104Z","1.0.4":"2018-02-13T11:48:48.601Z"},"homepage":"https://github.com/douzi8/base64-img","keywords":["base64","img","image","img base64","svg"],"repository":{"type":"git","url":"git+https://github.com/douzi8/base64-img.git"},"author":{"name":"douzi","email":"liaowei08@gmail.com"},"bugs":{"url":"https://github.com/douzi8/base64-img/issues"},"license":"ISC","readmeFilename":"README.md","users":{"xumakjosh":true,"456wyc":true,"wzbg":true,"rbecheras":true,"sunhua":true,"mayq0422":true,"jwright04":true,"lukeramsden":true,"ashiknesin":true,"roadlabs":true,"yorts52":true,"psbolden":true,"nilslikestacos":true,"saurabhjaya":true,"zuojiang":true,"douzi":true}}