{"_id":"hex2dec","_rev":"4106754","name":"hex2dec","description":"Arbitrary precision decimal/hexadecimal converter.","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"time":{"modified":"2026-01-11T18:56:23.000Z","created":"2016-07-10T02:19:12.131Z","1.1.2":"2019-01-12T01:47:43.139Z","1.1.1":"2018-12-04T06:16:07.800Z","1.1.0":"2018-09-14T05:25:45.066Z","1.0.1":"2016-07-10T02:25:40.794Z","1.0.0":"2016-07-10T02:19:12.131Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"versions":{"1.1.2":{"name":"hex2dec","version":"1.1.2","description":"Arbitrary precision decimal/hexadecimal converter.","main":"index.js","scripts":{"test":"mocha tests/*.test.js","preversion":"npm test","postversion":"git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"keywords":["decimal","hexadecimal","converter","precision","int64","long","hex"],"contributors":[{"name":"Dan Vanderkam","email":"danvdk@gmail.com"},{"name":"Don McCurdy","email":"dm@donmccurdy.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"homepage":"https://github.com/donmccurdy/hex2dec#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"d92c17eca5fce4d2e9e7e8fec780b77d535a3530","_id":"hex2dec@1.1.2","_npmVersion":"6.5.0","_nodeVersion":"8.1.3","_npmUser":{"name":"donmccurdy","email":"dm@donmccurdy.com"},"dist":{"shasum":"8e1ce4bef36a74f7d5723c3fb3090c2860077338","size":6778,"noattachment":false,"key":"/hex2dec/-/hex2dec-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hex2dec/download/hex2dec-1.1.2.tgz"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hex2dec_1.1.2_1547257663047_0.5753570912125192"},"_hasShrinkwrap":false,"publish_time":1547257663139,"_cnpm_publish_time":1547257663139,"_cnpmcore_publish_time":"2021-12-16T22:28:19.348Z"},"1.1.1":{"name":"hex2dec","version":"1.1.1","description":"Arbitrary precision decimal/hexadecimal converter.","main":"index.js","scripts":{"test":"mocha tests/*.test.js","preversion":"npm test","postversion":"git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"keywords":["decimal","hexadecimal","converter","precision","int64","long","hex"],"contributors":[{"name":"Dan Vanderkam","email":"danvdk@gmail.com"},{"name":"Don McCurdy","email":"dm@donmccurdy.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"homepage":"https://github.com/donmccurdy/hex2dec#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"1d94efa9f572c3686be6531ab544bbe081e15e6a","_id":"hex2dec@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.1.3","_npmUser":{"name":"donmccurdy","email":"dm@donmccurdy.com"},"dist":{"shasum":"6d98ddb389e8b3fde7568dc26f93931b240e8fcf","size":6695,"noattachment":false,"key":"/hex2dec/-/hex2dec-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hex2dec/download/hex2dec-1.1.1.tgz"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hex2dec_1.1.1_1543904167584_0.32362466432644643"},"_hasShrinkwrap":false,"publish_time":1543904167800,"_cnpm_publish_time":1543904167800,"_cnpmcore_publish_time":"2021-12-16T22:28:19.562Z"},"1.1.0":{"name":"hex2dec","version":"1.1.0","description":"Arbitrary precision decimal/hexadecimal converter.","main":"index.js","scripts":{"test":"mocha tests/*.test.js","preversion":"npm test","postversion":"git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"keywords":["decimal","hexadecimal","converter","precision","int64","long","hex"],"contributors":[{"name":"Dan Vanderkam","email":"danvdk@gmail.com"},{"name":"Don McCurdy","email":"dm@donmccurdy.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"homepage":"https://github.com/donmccurdy/hex2dec#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"38fa1af70836ae66ff95dc785839259dfceac7c4","_id":"hex2dec@1.1.0","_npmVersion":"6.0.1","_nodeVersion":"8.1.3","_npmUser":{"name":"donmccurdy","email":"dm@donmccurdy.com"},"dist":{"shasum":"ac98767d3b834f30e8c0cc7b7566f6bb8447922e","size":6678,"noattachment":false,"key":"/hex2dec/-/hex2dec-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hex2dec/download/hex2dec-1.1.0.tgz"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hex2dec_1.1.0_1536902744954_0.7858874462241237"},"_hasShrinkwrap":false,"publish_time":1536902745066,"_cnpm_publish_time":1536902745066,"_cnpmcore_publish_time":"2021-12-16T22:28:19.800Z"},"1.0.1":{"name":"hex2dec","version":"1.0.1","description":"Arbitrary precision decimal/hexadecimal converter.","main":"index.js","scripts":{"test":"mocha tests/*.test.js","preversion":"npm test","postversion":"git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"keywords":["decimal","hexadecimal","converter","precision","int64","long","hex"],"contributors":[{"name":"Dan Vanderkam","email":"danvdk@gmail.com"},{"name":"Don McCurdy","email":"dm@donmccurdy.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"homepage":"https://github.com/donmccurdy/hex2dec#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"b95452f79bbf7031ee631549e42d80d06b58039f","_id":"hex2dec@1.0.1","_shasum":"949bb33f1fdbbeab20e06403a00fc7d5ff284207","_from":".","_npmVersion":"3.7.2","_nodeVersion":"5.5.0","_npmUser":{"name":"donmccurdy","email":"dm@donmccurdy.com"},"dist":{"shasum":"949bb33f1fdbbeab20e06403a00fc7d5ff284207","size":6505,"noattachment":false,"key":"/hex2dec/-/hex2dec-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hex2dec/download/hex2dec-1.0.1.tgz"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hex2dec-1.0.1.tgz_1468117538297_0.655822257976979"},"directories":{},"publish_time":1468117540794,"_hasShrinkwrap":false,"_cnpm_publish_time":1468117540794,"_cnpmcore_publish_time":"2021-12-16T22:28:20.056Z"},"1.0.0":{"name":"hex2dec","version":"1.0.0","description":"Arbitrary precision decimal/hexadecimal converter.","main":"index.js","scripts":{"test":"mocha tests/*.test.js","preversion":"npm test","postversion":"git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/donmccurdy/hex2dec.git"},"keywords":["decimal","hexadecimal","converter","precision","int64","long","hex"],"contributors":[{"name":"Dan Vanderkam","email":"danvdk@gmail.com"},{"name":"Don McCurdy","email":"dm@donmccurdy.com"}],"license":"UNLICENSED","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"homepage":"https://github.com/donmccurdy/hex2dec#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"ceb081439625859786d1e05c07587acd20cec564","_id":"hex2dec@1.0.0","_shasum":"c917605916ce676de9525ca33a04647e5f8eedc3","_from":".","_npmVersion":"3.7.2","_nodeVersion":"5.5.0","_npmUser":{"name":"donmccurdy","email":"dm@donmccurdy.com"},"dist":{"shasum":"c917605916ce676de9525ca33a04647e5f8eedc3","size":2485,"noattachment":false,"key":"/hex2dec/-/hex2dec-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hex2dec/download/hex2dec-1.0.0.tgz"},"maintainers":[{"name":"donmccurdy","email":"don.r.mccurdy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hex2dec-1.0.0.tgz_1468117150788_0.6718505390454084"},"directories":{},"publish_time":1468117152131,"_hasShrinkwrap":false,"_cnpm_publish_time":1468117152131,"_cnpmcore_publish_time":"2021-12-16T22:28:20.251Z"}},"readme":"# hex2dec\n\n[![Latest NPM release](https://img.shields.io/npm/v/hex2dec.svg)](https://www.npmjs.com/package/hex2dec)\n[![Minzipped size](https://badgen.net/bundlephobia/minzip/hex2dec)](https://bundlephobia.com/result?p=hex2dec)\n[![License](https://img.shields.io/npm/l/hex2dec.svg)](https://github.com/donmccurdy/hex2dec/blob/master/LICENSE)\n[![Build Status](https://travis-ci.com/donmccurdy/hex2dec.svg?branch=master)](https://travis-ci.com/donmccurdy/hex2dec)\n\nArbitrary precision decimal↔️hexadecimal converter, from a [blog post](http://www.danvk.org/hex2dec.html) by [Dan Vanderkam](https://github.com/danvk). Supports non-negative integer values.\n\n## Usage\n\n```\nnpm install --save hex2dec\n```\n\n```javascript\nvar converter = require('hex2dec');\n\nvar dec = converter.hexToDec('0xFA'); // 250\nvar hex = converter.decToHex('250'); // '0xfa'\nvar hexString = converter.decToHex('250', { prefix: false }); // 'fa'\n```\n\n## Why use hex2dec\n\n`(250).toString(16) === 'fa'` and `250 === 0xFA` both work just fine, and will provide enough precision for most uses. For large (>64-bit) numbers, however, precision is lost. This utility provides a higher-precision alternative.\n\n## License\n\nThis code may be used under the [Apache 2 license](https://github.com/donmccurdy/hex2dec/blob/master/LICENSE).\n","_attachments":{},"homepage":"https://github.com/donmccurdy/hex2dec#readme","bugs":{"url":"https://github.com/donmccurdy/hex2dec/issues"},"license":"Apache-2.0"}