{"dist":{"shasum":"ed6baba176a70f2848019174db2412e212aa53a5","tarball":"https://registry.npmjs.org/humanize/-/humanize-0.0.4.tgz","integrity":"sha512-ApIwK2abKPKe78FZnEZ+70YvTTPF0TmRMMMybI7rSOjp55g/oRNG0PxLR60p1lJnuRP6hEgiG0CM9i4niMzoaA==","signatures":[{"sig":"MEUCIQCMj/H/Y/Ay+988nsZib2XBiagAgkmxSg87aBNk1yDJBwIgbkD1nG8Sb4q73IO3/pqT/Vo5SlBvDYQVWDNVvcMAZkk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"humanize.js","name":"humanize","author":{"name":"Tai-Jin Lee","email":"taijin@gmail.com"},"readme":"# humanize #\n\nJavascript data formatter for human readability.\n\nIdea, name, and initial code blatently stolen from [milanvrekic/JS-humanize](http://github.com/milanvrekic/JS-humanize)\n\nCan be loaded via AMD or in node directly.\n\n## Installation ##\n\n    npm install humanize\n\n## Usage: ##\n```javascript\nvar humanize = require('humanize');\nhumanize.date('Y-m-d'); // 'yyyy-mm-dd'\nhumanize.filesize(1234567890); // '1.15 Gb'\n```\n\n## Functions available: ##\n\n####humanize.noConflict()####\nGive control of the \"humanize\" variable back to its previous owner. Returns a reference to the humanize object.\n\n####humanize.time()####\nRetrieves the current time in seconds\n\n####humanize.date(format [, timestamp / JS Date Object = new Date()])####\nThis is a port of [php.js date](http://phpjs.org/functions/date:380) and behaves exactly like [PHP's date](http://php.net/manual/en/function.date.php)\n\n####humanize.numberFormat(number [, decimals = 2, decPoint = '.', thousandsSep = ','])####\nFormat a number to have decimal significant decimal places, using decPoint as the decimal separator, and thousandsSep as thousands separater\n\n####humanize.naturalDay(timestamp [, format = 'Y-m-d'])####\nReturns 'today', 'tomorrow' or 'yesterday', as appropriate, otherwise format the date using the passed format with humanize.date()\n\n####humanize.naturalTime####\n\n####humanize.ordinal(integer)####\nConverts a number into its [ordinal representation](http://en.wikipedia.org/wiki/Ordinal_number_\\(linguistics\\)).\n\n####humanize.filesize(filesize [, kilo = 1024, decimals = 2, decPoint = '.', thousandsSep = ',']) ####\nConverts a byte count to a human readable value using kilo as the basis, and numberFormat formatting\n\n####humanize.linebreaks(string)####\nConverts a string's newlines into properly formatted html ie. one new line -> br, two new lines -> p, entire thing wrapped in p\n\n####humanize.nl2br(string)####\nConverts a string's newlines into br's\n\n####humanize.truncatechars(string, length)####\nTruncates a string to length-1 and appends '…'. If string is shorter than length, then no-op\n\n####humanize.truncatewords(string, numWords)####\nTruncates a string to only include the first numWords words and appends '…'. If string has fewer words than newWords, then no-op\n","engines":{"node":"*"},"scripts":{"test":"./node_modules/jshint/bin/hint humanize.js; find specs -type f -a -name *.spec.js -exec ./node_modules/mocha/bin/mocha --globals requirejsVars -R list --require should {} \\;"},"_npmUser":{"name":"taijin","email":"taijin@gmail.com"},"homepage":"https://github.com/taijinlee/humanize","keywords":["util","client","browser"],"repository":{"url":"git://github.com/taijinlee/humanize.git","type":"git"},"_npmVersion":"1.1.21","description":"Javascript string formatter for human readability","directories":{},"maintainers":[{"name":"taijin","email":"taijin@gmail.com"}],"_nodeVersion":"v0.6.18","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"mocha":"1.0.3","jshint":"0.7.1","should":"0.6.3"},"_engineSupported":true,"optionalDependencies":{},"_id":"humanize@0.0.4","version":"0.0.4"}