{"name":"hi-base32","version":"0.1.1","description":"A simple Base32 encode / decode function for JavaScript supports UTF-8 encoding.","main":"src/base32.js","devDependencies":{"expect.js":"~0.3.1","jscoverage":"~0.5.9"},"scripts":{"test":"mocha tests/node-test.js -r jscoverage","coveralls":"mocha tests/node-test.js -R mocha-lcov-reporter -r jscoverage | coveralls"},"repository":{"type":"git","url":"https://github.com/emn178/hi-base32.git"},"keywords":["base32","encode","decode"],"license":"MIT","author":{"name":"emn178","email":"emn178@gmail.com"},"homepage":"https://github.com/emn178/hi-base32","bugs":{"url":"https://github.com/emn178/hi-base32/issues"},"gitHead":"bda8e3aba1086622198eb7fe47fc8afd0e92e205","_id":"hi-base32@0.1.1","_shasum":"a30fcb56e7362cf5ef6f543e4c280d50647e5e80","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.35","_npmUser":{"name":"emn178","email":"emn178@gmail.com"},"maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"dist":{"shasum":"a30fcb56e7362cf5ef6f543e4c280d50647e5e80","tarball":"http://registry-npm.ywwl.com/hi-base32/download/hi-base32-0.1.1.tgz","integrity":"sha512-tLk5JwYwGvtxxEVG2z6uugjBbXxJ/jXdVUcOgS1EYqFOGLuGVkCuctO0rY/OTYQS+OaqJYwGGb8wR0fTQ39nKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG02lmQ4RYdq9MoGlN5r1MFaMuHJX/y8lN8lvASGcYOUAiBuV+8JxgFmkrMopb1+Cz/iAnWhEb74YKOO1sVZvEOUxg=="}],"size":8710,"noattachment":false,"key":"/hi-base32/-/hi-base32-0.1.1.tgz"},"directories":{},"readme":"# hi-base32\nA simple Base32(RFC 4648) encode / decode function for JavaScript supports UTF-8 encoding.  \n[![Build Status](https://api.travis-ci.org/emn178/hi-base32.png)](https://travis-ci.org/emn178/hi-base32)\n[![Build Status](https://coveralls.io/repos/emn178/hi-base32/badge.png?branch=master)](https://coveralls.io/r/emn178/hi-base32?branch=master)  \n[![NPM](https://nodei.co/npm/hi-base32.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/hi-base32)\n\n## Demo\n[Base32 Encode Online](http://emn178.github.io/online-tools/base32_encode.html)  \n[Base32 Decode Online](http://emn178.github.io/online-tools/base32_decode.html)  \n\n## Download\n[Compress](https://raw.github.com/emn178/hi-base32/master/build/base32.min.js)  \n[Uncompress](https://raw.github.com/emn178/hi-base32/master/src/base32.js)\n\n## Installation\nYou can also install hi-base32 by using Bower.\n\n    bower install hi-base32\n\nFor node.js, you can use this command to install:\n\n    npm install hi-base32\n\n## Usage\nYou could use like this:\n```JavaScript\nbase32.encode('String to encode');\nbase32.decode('Base32 string to decode');\n```\nIf you use node.js, you should require the module first:\n```JavaScript\nvar base32 = require('hi-base32');\n```\nIt supports AMD:\n```JavaScript\nrequire(['your/path/hi-baes32.js'], function (baes32) {\n// ...\n});\n```\n\n## TypeScript\n```TypeScript\nimport * as base32 from 'hi-base32';\n// or\n// import { encode, decode } from 'hi-base32';\n\nbase32.encode('String to encode');\nbase32.decode('Base32 string to decode');\n```\n\n### Methods\n\n#### base32.encode(input, asciiOnly)\n\nEncode string or bytes to base32, set asciiOnly to true for better performace if it is.\n\n##### *input: `String`, `Array`, `Uint8Array` or `ArrayBuffer`*\n\nInput string or bytes to encode.\n\n##### *asciiOnly: `Boolean` (default: `false`)*\n\nSpecify the string encoding is ASCII. It only works when string input.\n\n#### base32.decode(base32Str, asciiOnly)\n\nDecode base32 string, set asciiOnly to true for better performace.\n\n##### *base32Str: `String`*\n\nBase32 string to decode.\n\n##### *asciiOnly: `Boolean` (default: `false`)*\n\nSpecify the string encoding is ASCII.\n\n#### base32.decode.asBytes(base32Str)\n\nDecode base32 string and return byte `Array`\n\n##### *base32Str: `String`*\n\nBase32 string to decode.\n\n## Example\n```JavaScript\nbase32.encode('Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.');\n// JVQW4IDJOMQGI2LTORUW4Z3VNFZWQZLEFQQG433UEBXW43DZEBRHSIDINFZSA4TFMFZW63RMEBRHK5BAMJ4SA5DINFZSA43JNZTXK3DBOIQHAYLTONUW63RAMZZG63JAN52GQZLSEBQW42LNMFWHGLBAO5UGSY3IEBUXGIDBEBWHK43UEBXWMIDUNBSSA3LJNZSCYIDUNBQXIIDCPEQGCIDQMVZHGZLWMVZGC3TDMUQG6ZRAMRSWY2LHNB2CA2LOEB2GQZJAMNXW45DJNZ2WKZBAMFXGIIDJNZSGKZTBORUWOYLCNRSSAZ3FNZSXEYLUNFXW4IDPMYQGW3TPO5WGKZDHMUWCAZLYMNSWKZDTEB2GQZJAONUG64TUEB3GK2DFNVSW4Y3FEBXWMIDBNZ4SAY3BOJXGC3BAOBWGKYLTOVZGKLQ=\nbase32.decode('JBSWY3DP'); // Hello\nbase32.decode.asBytes('JBSWY3DP'); // [72, 101, 108, 108, 111]\n\n// It also supports UTF-8 encoding\nbase32.encode('中文'); // 4S4K3ZUWQ4======\n```\n\n## License\nThe project is released under the [MIT license](http://www.opensource.org/licenses/MIT).\n\n## Contact\nThe project's website is located at https://github.com/emn178/hi-base32  \nAuthor: Chen, Yi-Cyuan <emn178@gmail.com>\n","publish_time":1426415850010,"_cnpm_publish_time":1426415850010,"dist-tags":{"latest":"0.6.0"}}