{"_id":"hi-base32@0.6.0","nyc":{"exclude":["tests"]},"bugs":{"url":"https://github.com/emn178/hi-base32/issues"},"dist":{"shasum":"fb24faa1659b5c6823ee3eadd75435fd025bbfd5","tarball":"http://registry-npm.ywwl.com/hi-base32/download/hi-base32-0.6.0.tgz","fileCount":11,"integrity":"sha512-MVLsWpr97uu7xRyHARRQNpdFQRNWrydIusX1flyV4ELAyA7FzzPscHHamZon3bfDUuktt2H6fiCj9n0nJCVTpQ==","signatures":[{"sig":"MEUCIQC7we264lPd08vwcaINMF8UkAT3WFLLw3PSNzkiUDDbmgIgKBU9jORgzhIbWXwvwOiG1CNZOGdnd+8/+IXgJiL4X3Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDcoOfBUw/OQFZdyvqxhfiu+zQPEhv36ULyc7G0mcTdkAIgMuATsfxG1DZgrBEpdK0G/NkIAZwxPABkWWDksBaDA/E="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/hi-base32@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57137,"size":12074,"noattachment":false,"key":"/hi-base32/-/hi-base32-0.6.0.tgz"},"main":"src/base32.js","name":"hi-base32","types":"./index.d.ts","author":{"name":"Chen, Yi-Cyuan","email":"emn178@gmail.com"},"module":"build/base32.mjs","exports":{".":{"types":"./index.d.ts","import":"./build/base32.mjs","default":"./src/base32.js","require":"./src/base32.js"},"./package.json":"./package.json","./src/base32.js":"./src/base32.js","./build/base32.mjs":"./build/base32.mjs","./build/base32.min.js":"./build/base32.min.js","./build/base32.min.mjs":"./build/base32.min.mjs"},"gitHead":"cbc41fcb351b7f5c23f66443cbe7e439da3f1ff5","license":"MIT","scripts":{"test":"npm run build && npm run test:coverage","build":"rollup -c && uglifyjs src/base32.js -c -m --comments -o build/base32.min.js","report":"nyc --reporter=html --reporter=text mocha tests/node-test.js","prepack":"npm run build","coveralls":"nyc report --reporter=text-lcov | coveralls","test:runtime":"mocha tests/node-test.js","test:coverage":"nyc --reporter=text --reporter=html --reporter=lcov mocha tests/node-test.js"},"version":"0.6.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"9b180df3-d0f5-47ea-a97e-2abbf42938c0"}},"homepage":"https://github.com/emn178/hi-base32","keywords":["base32","encode","decode"],"repository":{"url":"git+https://github.com/emn178/hi-base32.git","type":"git"},"_npmVersion":"11.19.0","description":"A simple Base32 encode / decode function for JavaScript supports UTF-8 encoding.","directories":{},"maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"devDependencies":{"nyc":"^18.0.0","mocha":"^12.0.3","rollup":"^4.65.0","expect.js":"~0.3.1","uglify-js":"^3.19.3","@rollup/plugin-terser":"^1.0.2","@rollup/plugin-commonjs":"^28.0.9"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hi-base32_0.6.0_1792997953605_0.36256862744828466"},"readme":"# hi-base32\n[![CI](https://github.com/emn178/hi-base32/actions/workflows/ci.yml/badge.svg)](https://github.com/emn178/hi-base32/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/emn178/hi-base32/badge.svg?branch=master)](https://coveralls.io/r/emn178/hi-base32?branch=master)\n[![NPM](https://img.shields.io/npm/v/hi-base32)](https://www.npmjs.com/package/hi-base32)\n[![CDNJS](https://img.shields.io/jsdelivr/npm/hm/hi-base32)](https://www.jsdelivr.com/package/npm/hi-base32)\n\nA simple Base32(RFC 4648) encode / decode function for JavaScript supports UTF-8 encoding.\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, casefold)\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##### *casefold: `Boolean` (default: `false`)*\n\nAccept lowercase alphabet (`a-z`) as input. RFC 4648 only defines uppercase alphabet, so it is disabled by default.\n\n#### base32.decode.asBytes(base32Str, casefold)\n\nDecode base32 string and return byte `Array`\n\n##### *base32Str: `String`*\n\nBase32 string to decode.\n\n##### *casefold: `Boolean` (default: `false`)*\n\nAccept lowercase alphabet (`a-z`) as input.\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":1792997953694,"_cnpm_publish_time":1792997953694,"dist-tags":{"latest":"0.6.0"}}