{"_id":"number-abbreviate","_rev":"19-7364396c52ce9baf1422adce51c4057f","name":"number-abbreviate","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","dist-tags":{"latest":"2.0.0"},"versions":{"0.0.0":{"name":"number-abbreviate","version":"0.0.0","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","scripts":{"lint":"./node_modules/.bin/jshint .","pretest":"npm run-script lint","test":"./node_modules/.bin/_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"_id":"number-abbreviate@0.0.0","dist":{"shasum":"a3e9b5369c016cb2529f5a129f49aeb0b31e9450","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-0.0.0.tgz","integrity":"sha512-URpO12H2peMUwe/K20i1ubSrFgiPEj5l+/jxDPRSoRbMMF1Ji50t9LJ3SuQ76SOJIYJtuH2dYjySfamZFFPQIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4NS6RVF60MbXMoCYDTpr2pJdeIXwyk8q70MDAasuKZAIgK7wWfkuFmPr3XODKjZl+huqbWLDIEQpDssLMNHTPQaQ="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}]},"0.0.1":{"name":"number-abbreviate","version":"0.0.1","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"./node_modules/.bin/jshint .","pretest":"npm run-script lint","test":"./node_modules/.bin/_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate","_id":"number-abbreviate@0.0.1","dist":{"shasum":"2fbc9d5af404abe60d27216dcd0c3cff221b83ca","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-0.0.1.tgz","integrity":"sha512-iIXUIyPfGCUkgTxma9+G0aJkullyqyRAbWMW7t6bzIFScou3JYecXaJkyBnfpd390KmvmLVmsHiFH6bIPlg7sA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9OS8gktCrSnaMLwFxuSlW2BnaYn1AtTHUElfRHtBZxQIgQ/In9b2Djxjrvb7m+3HUKgcRzXdvz/t4JLnSjO+FIwE="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}]},"0.0.2":{"name":"number-abbreviate","version":"0.0.2","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"./node_modules/.bin/jshint .","pretest":"npm run-script lint","test":"./node_modules/.bin/_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate","_id":"number-abbreviate@0.0.2","dist":{"shasum":"a6f7b537b27680638b9b147508aa8e840b4d3705","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-0.0.2.tgz","integrity":"sha512-KPHDlNHARpOI3cimwVwPsp8BrW1nPSPP014tew08QeK/BjHgnw43qdd6WeVKWqDJE+VClro0d1utZz5fr2j5tA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3sMgyPF91qRzeM/pVa0UburJuCq9qbkx3ONm5oytHWAIhAKN1W8m3gpTA9QySEyS7WrNxQCaads3rfVuMrHZVPxgx"}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}]},"0.0.3":{"name":"number-abbreviate","version":"0.0.3","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"./node_modules/.bin/jshint .","pretest":"npm run-script lint","test":"./node_modules/.bin/_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate","_id":"number-abbreviate@0.0.3","dist":{"shasum":"b4e2ab03202117f685830202b101da7807659d46","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-0.0.3.tgz","integrity":"sha512-bM9cRvJYPCD8Wvfa6o5NLoTR+s2d2xK57GZU+ue/xyl9NeTBZ1MYaQjXaxM19rNfBQ6R+C2EgBJ1f6DOWtfjvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzTMgLRMDZ2NDdEYBD7jKQb452v98ddhZhUTvQhWUDtQIhAN9T8hLPKZh/KBkYttCO4OV96g7TrrH4W3BEUCD/frM7"}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}]},"1.0.0":{"name":"number-abbreviate","version":"1.0.0","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"jshint .","pretest":"npm run-script lint","test":"_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"gitHead":"9af3224d08cfd49cee51df5bd88f0d5fe65bd49d","bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate","_id":"number-abbreviate@1.0.0","_shasum":"ab77d808c5f98bf6037fe3ec32231be254f3f9b5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}],"dist":{"shasum":"ab77d808c5f98bf6037fe3ec32231be254f3f9b5","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-1.0.0.tgz","integrity":"sha512-ZI6AB+Rx5dCmFzVuUtaBxY4AaBCe45AGyQcXDKvjm39ndsZUOED4BzBTdF16b4q+rMfGg4HMQQ6AEEpGb/DmkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIALwDDohVPhrop8iboKfEwrl1e9v9qFrShqk2CdvLAIUAiAhWX37fDBno8D7EONJuDgnE5w/8TYbUZV0UA25UKe7OA=="}]}},"1.2.0":{"name":"number-abbreviate","version":"1.2.0","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"jshint .","pretest":"npm run-script lint","test":"_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"gitHead":"e2f38cd852f0a0c71cb2e9e19902987400a5476d","bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate#readme","_id":"number-abbreviate@1.2.0","_shasum":"72c96ff564b70a109d567ab541e6856a39b8c368","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"dist":{"shasum":"72c96ff564b70a109d567ab541e6856a39b8c368","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-1.2.0.tgz","integrity":"sha512-q1GJ3wv1QE0Z/RQ9EvqKIJgNttWzT2qb2dJw2J++nrhGDSU0NQYZgr+LTWCvOCbNcUsWsVrUBwF7K2VrYT5izg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeaaQGzAevzSsMc49E5VxzAdIcC9zBfavDF+rGJ7w8+AIgBoELgr0rf8KeZ1W2J+FEpem6TyNnFcHIF5T3P56aeKc="}]},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/number-abbreviate-1.2.0.tgz_1469476483127_0.5737743130885065"}},"1.2.1":{"name":"number-abbreviate","version":"1.2.1","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"jshint .","pretest":"npm run-script lint","test":"_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"gitHead":"84b1b9b33de7701aefbea97a28d339680b92e131","bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate#readme","_id":"number-abbreviate@1.2.1","_shasum":"463333967cb2ea37baed783e4a0f2beceb97f644","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"dist":{"shasum":"463333967cb2ea37baed783e4a0f2beceb97f644","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-1.2.1.tgz","integrity":"sha512-06kw35hsXvKhxBJD5esoM3WK7lnUCJcw1LEIvNv7XZsWH3t1X05tNes5rxoWPQcPPSyCigz8Hcn90d/j0bY+Bg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID92rcoRNcusraPkpfvtxK33hEsj6F6szr96YSTvL+9XAiB5SPG43C/jgUVbyLRjx7AKSGTF1PCe/X6XtKf8sOwvTg=="}]},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/number-abbreviate-1.2.1.tgz_1469476542257_0.9556780264247209"}},"2.0.0":{"name":"number-abbreviate","version":"2.0.0","description":"Abbreviate a number and add unit letters e.g. 2200000 => '2.2m'","author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/domharrington/js-number-abbreviate.git"},"scripts":{"lint":"jshint .","pretest":"npm run-script lint","test":"_mocha -- -R spec -r should test.js","prepublish":"npm test && npm prune"},"publishConfig":{"registry":"http://registry.npmjs.org/"},"keywords":["number","number-abbreviate","abbreviate"],"license":"BSD-2-Clause","devDependencies":{"mocha":"~1.14.0","jshint":"~2.3.0"},"gitHead":"00b73670886e079b04d5f2d814c1156747b71b2e","bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"homepage":"https://github.com/domharrington/js-number-abbreviate#readme","_id":"number-abbreviate@2.0.0","_shasum":"e9cb2d18db800e153cf072829553c4afe0df7898","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"domharrington","email":"dom@harrington-mail.com"},"dist":{"shasum":"e9cb2d18db800e153cf072829553c4afe0df7898","tarball":"https://registry.npmjs.org/number-abbreviate/-/number-abbreviate-2.0.0.tgz","integrity":"sha512-A28RCggQAd0GPafgnijus1IV48TD8lbVt/J6xzkhcfk7jvXbWbh5aTaQsMjZjWAJ6LK6EoGf306RzJsdu12OqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE83wRiBGobY1d+MyVuvKUmigDX77P5MfkY3Cg6hEF5SAiBGnistJ8hj/JiIb5N6SzZIvUqlDO6vC6XK0OMB/eB3Ew=="}]},"maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/number-abbreviate-2.0.0.tgz_1494263416445_0.5000871170777828"}}},"readme":"# number-abbreviate\n\nAbbreviate a number and add unit letters e.g. 2200000 => '2.2m'\n\n[![build status](https://secure.travis-ci.org/domharrington/js-number-abbreviate.png)](http://travis-ci.org/domharrington/js-number-abbreviate)\n\nCode inspired by [http://stackoverflow.com/questions/2685911/is-there-a-way-to-round-numbers-into-a-reader-friendly-format-e-g-1-1k](http://stackoverflow.com/questions/2685911/is-there-a-way-to-round-numbers-into-a-reader-friendly-format-e-g-1-1k)\n\n## Example\nSimple/shorthand mode:\n\n```js\nvar abbreviate = require('number-abbreviate')\nabbreviate(1000) // => 1k\nabbreviate(1111, 0) // => 1k\nabbreviate(1111, 1) // => 1.1k\nabbreviate(1111, 2) // => 1.11k\n```\n\nClass/constructor mode:\n``` js\nvar NumAbbr = require('number-abbreviate')\n\nvar numAbbr = new NumAbbr()\n\nnumAbbr.abbreviate(12, 1)\n// => 12\nnumAbbr.abbreviate(0, 2)\n// => 0\nnumAbbr.abbreviate(1234, 0)\n// => 1k\nnumAbbr.abbreviate(34567, 2)\n// => 34.57k\nnumAbbr.abbreviate(918395, 1)\n// => 918.4k\nnumAbbr.abbreviate(2134124, 2)\n// => 2.13m\nnumAbbr.abbreviate(47475782130, 2)\n// => 47.48b\nnumAbbr.abbreviate(-1234, 0)\n// => -1k\nnumAbbr.abbreviate(-918395, 1)\n// => -918.4k\nnumAbbr.abbreviate(-47475782130, 2)\n// => -47.48b\n```\n\n## Usage\n``` js\nvar NumAbbr = require('number-abbreviate')\n\nvar numAbbr = new NumAbbr([units])\n\nnumAbbr.abbreviate([number], [decPlaces])\n```\n\nThe `units` is optional. It can be an array of units, defaulting to `['k', 'm', 'b', 't']`.\n\n`decPlaces` is also optional. It defaults to 0.\n\n### numAbbr.abbreviate([number], [decPlaces])\n\nTakes a number and the number of decimal places to abbreviate\n\n## Installation\n```\nnpm install number-abbreviate --save\n\nbower install number-abbreviate\n```\n\n## Credits\n[Dom Harrington](https://twitter.com/domharrington)\n\n[http://stackoverflow.com/questions/2685911/is-there-a-way-to-round-numbers-into-a-reader-friendly-format-e-g-1-1k](http://stackoverflow.com/questions/2685911/is-there-a-way-to-round-numbers-into-a-reader-friendly-format-e-g-1-1k)\n\n## License\nLicensed under the [New BSD License](http://opensource.org/licenses/bsd-license.php)\n","maintainers":[{"name":"domharrington","email":"dom@harrington-mail.com"}],"time":{"modified":"2022-06-22T13:16:29.688Z","created":"2014-01-09T15:00:33.992Z","0.0.0":"2014-01-09T15:00:34.692Z","0.0.1":"2014-01-13T14:51:26.528Z","0.0.2":"2014-02-06T09:44:49.354Z","0.0.3":"2014-02-07T08:45:24.265Z","1.0.0":"2015-01-15T09:17:55.440Z","1.2.0":"2016-07-25T19:54:45.249Z","1.2.1":"2016-07-25T19:55:44.607Z","2.0.0":"2017-05-08T17:10:18.918Z"},"author":{"name":"Dom Harrington","email":"dom@harrington-mail.com"},"repository":{"type":"git","url":"git+https://github.com/domharrington/js-number-abbreviate.git"},"readmeFilename":"README.md","homepage":"https://github.com/domharrington/js-number-abbreviate#readme","keywords":["number","number-abbreviate","abbreviate"],"bugs":{"url":"https://github.com/domharrington/js-number-abbreviate/issues"},"license":"BSD-2-Clause","users":{"nanotime":true}}