{"_id":"human-readable","_rev":"4-16ca8dc1c1cee263fcaffddc37a62149","name":"human-readable","description":"Presenting values in human-readable form.","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"human-readable","version":"0.0.1","description":"Presenting values in a human-readable format since 1886.","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mvasilkov/human-readable.git"},"author":{"name":"Mark Vasilkov","url":"https://github.com/mvasilkov"},"license":"MIT","scripts":{"test":"ava"},"devDependencies":{"ava":"^0.23.0"},"gitHead":"c65b98d07af46fed623500945f5baf4e819599e2","bugs":{"url":"https://github.com/mvasilkov/human-readable/issues"},"homepage":"https://github.com/mvasilkov/human-readable#readme","_id":"human-readable@0.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"mvasilkov","email":"mvasilkov@gmail.com"},"dist":{"integrity":"sha512-CFkNifMmjEVytvAj8ekFmNVE/lZO989SqCrbwxEMjwtbhwOGBWr7IfiyWZvOffOepeFDpxBa0eB2AVIUnVcd1w==","shasum":"b6b0a70c596a9c9538158e40a8776652b016e3ef","tarball":"https://registry.npmjs.org/human-readable/-/human-readable-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBRCK0Rcfn7m2iTqfMylyL3rxqvl3HsxNDT9/9/o8YewIgA/zi6mm8O2xIqOOLtpZZK2af8gS9IhpByHPfMiT2OEI="}]},"maintainers":[{"name":"mvasilkov","email":"mvasilkov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/human-readable-0.0.1.tgz_1510042696181_0.6145067568868399"},"directories":{}},"0.1.0":{"name":"human-readable","version":"0.1.0","description":"Presenting values in human-readable form.","main":"javascript/readable.js","types":"javascript/readable.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/mvasilkov/human-readable.git"},"author":{"name":"Mark Vasilkov","url":"https://github.com/mvasilkov"},"license":"MIT","scripts":{"test":"ava"},"devDependencies":{"ava":"^2.4.0"},"gitHead":"25d3fb29c2ce5c654b33a4b59b183c91af5b5be4","bugs":{"url":"https://github.com/mvasilkov/human-readable/issues"},"homepage":"https://github.com/mvasilkov/human-readable#readme","_id":"human-readable@0.1.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-AUR6ksBNfDIysMWx2DJAHvhrhgn9hm7/p/8g2grdoZ3fKfJAuXD3sYeh2QMcLtrTFJ8LFJ5UeUPcKA7gBQcj8w==","shasum":"aa9a564622abaae6e050b63c8464c0d83b195611","tarball":"https://registry.npmjs.org/human-readable/-/human-readable-0.1.0.tgz","fileCount":10,"unpackedSize":9384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlMNiCRA9TVsSAnZWagAANegP/0mTc1NdweXCaTWWrVu4\nc3+Z93twbQXN7O1ByZbd4unXMnnYHDkzm8SrwJlFFgiSXulTttqeL6RPJdEi\nb/JL+tBnbQ6QwlaWtFLsxIAO1BgG3Sdx4b50yq7nq4Toa7crAdf5YezOX4wM\n64dwBZzTDkIRwtC9UeohdGtF6MbnotX5Bsrtf9kD7MwP9C9+Nz3T6Dnp/qpw\nwjW9ItWbuLgdpblI92F2/OQI+RRV7Gr6LbB3/sAwg7eqxWd/AiBxScXNsGao\nrBik3QMEHxAu0JTMlvwvkIUwLhR1DZZVHIr0713HhhgzIZ3sPxUq54Nzhshg\naOqJ80UOSv7M4GCFXGE+NziOx+T+Y3zRwE7ZUJuAKfhCug+b59tFiRCvyCXP\nevW4cWupEGW4NxKNy5M3HC/K8gPUjUkqD85JkXisaINaQIMuzKDT6MWh1cpl\n/NqSGOPn/xB8JD2u/K0VCEVuKd1xRAUmcdNVmbQpnj75fr0IkCnI3AE4QLRL\nGUMCqQ4QQOr5rj/QFcufRO9J84tKF7GBIRhCDWb7le/GCJlA4MC6XHKJ3AqW\nwCZ1HT09mJMSD4j1rqdPVDRpCy+5kulwXS59SiSwpddE6nSp9kvts/jcsMWe\nOw4vOKUyJWxbmez6oGJ68deAFGxh9uHQ2XAz1iVhd5s7nCqbwlKY9UCf0+NZ\nfnxA\r\n=qg8i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQ6plhzhU7x0+K4wUIj+8n/sb4OkMxOQhYC23fp9LAfAiEAqeCNrhpmqay4FxiMpzaaWZ71rwz74mAafXnHBomcXvQ="}]},"maintainers":[{"name":"mvasilkov","email":"mvasilkov@gmail.com"}],"_npmUser":{"name":"mvasilkov","email":"mvasilkov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/human-readable_0.1.0_1570030434045_0.8240696645336965"},"_hasShrinkwrap":false},"0.2.0":{"name":"human-readable","version":"0.2.0","description":"Presenting values in human-readable form.","keywords":["format","filesize","iec","jedec","readable","no-dependencies"],"main":"javascript/readable.js","types":"javascript/readable.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/mvasilkov/human-readable.git"},"author":{"name":"Mark Vasilkov","url":"https://github.com/mvasilkov"},"license":"MIT","scripts":{"test":"smol test"},"devDependencies":{"smoltest":"*"},"gitHead":"0c9de4e74ef9d77c7a2d8fb1d16ea68c4d047b3c","bugs":{"url":"https://github.com/mvasilkov/human-readable/issues"},"homepage":"https://github.com/mvasilkov/human-readable#readme","_id":"human-readable@0.2.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-lwkMY8EirqFzCfN9n9rZkXl+wrQwec2hJNdmf7Y/jtKXcFhoQ+WXaz+DQNQVif/5hxRCyAeWphiJS3BJELn2jQ==","shasum":"bcf63d46c079f06a817121bc96a7c1b5df45bcaf","tarball":"https://registry.npmjs.org/human-readable/-/human-readable-0.2.0.tgz","fileCount":14,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTtsCCRA9TVsSAnZWagAA+O8P/1+MK8zmN3JUZpfEJ1OG\nh4WMIDxDtQJ4GeEF9n5tu+TP4gH1gF+zgP2HrjV+g/SzAS7YMgTPvF/rKchr\n1etobEe996/KiwgRD9DuqxV4ouB+h0gyR/zi+V25JalBqfcZFpdmyZx4KflT\nyz4issYTIIR2GDQli8sR7kFx9wlpQNp4PthjI2TPFEOY/6FNkBVl+Yz67Hk/\nBPIUopFi3VUv/SHeNjvuuSmWedaZX87+BCuCqWAm/bFL/lwShdtVNQpZ9qRR\n4lKZ02ZB5+pBaf1HaZllLdsqnKS8RoErqGJmumbgE8r94hK42tmhfOCvtbQp\nP+A/rrfcOplQKGbI5qz2bouqUznQBTGgDSs/jubmxpj8RYAXdhk0cTtTJWe0\n47m3n4r/ODsdAhdshrsWV98u/2JNk3nCM3gK+JAYYF0wLEDiT12n+vIAGIPB\nQ0Vk0Gvv3jp2xCbimL+g4D4SS1x5Mp55InmtoDFaYk14TCndeP/8rBVJyuqA\nqH47ZiPb1PK7Orv1EflCjEAWJZmmmKikAuh2kZyOk1nUy/wukz+GAXGMAplm\n2sjINog0N3udkgwLjNKlQHowlrEp6EUM/l8HJ8gR0E4DodPNoitrX6hpSSjO\nVIWTUHQ0U+ClU+xAdrsT/juBIiljF/nUfq5Hf32F/VmTTQKszn5qLoOxKtvw\n887f\r\n=HbmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcufkT48+6cJ3HjLkTTAMzf2L8MBuk/lhQy4db27yAawIgLRBeNQeGTsCimkylm8LOAJmPlOUUt419xHAFtlXr/aA="}]},"maintainers":[{"name":"mvasilkov","email":"mvasilkov@gmail.com"}],"_npmUser":{"name":"mvasilkov","email":"mvasilkov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/human-readable_0.2.0_1582226178191_0.27500362109376364"},"_hasShrinkwrap":false},"0.2.1":{"name":"human-readable","version":"0.2.1","description":"Presenting values in human-readable form.","keywords":["format","filesize","iec","jedec","readable","no-dependencies"],"main":"javascript/readable.js","types":"javascript/readable.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/mvasilkov/human-readable.git"},"author":{"name":"Mark Vasilkov","url":"https://github.com/mvasilkov"},"license":"MIT","scripts":{"test":"smol test"},"devDependencies":{"smoltest":"*"},"gitHead":"d025658b929b2727f43ef53d9fa5bd6a8dd6298f","bugs":{"url":"https://github.com/mvasilkov/human-readable/issues"},"homepage":"https://github.com/mvasilkov/human-readable#readme","_id":"human-readable@0.2.1","_nodeVersion":"13.7.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-uFtz4WZlB1M5xI45MZ5AjyAzfrrgLOdty4363Jd0LQ5NGXa+UiKaD0EQXQeDfCinodrpePFk/vKjzBlDTZdZQQ==","shasum":"af2e73a0f2e8e7d31d4d3f10ef476ad1e2bb52d8","tarball":"https://registry.npmjs.org/human-readable/-/human-readable-0.2.1.tgz","fileCount":9,"unpackedSize":10156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT99iCRA9TVsSAnZWagAAHioP+gOON8eywWLhxKtgeV6u\nu4b1XEt2868dho5aoBzPpBAwcpx97wn2/WUuuUcAjIYH0a/aK94A5GX5af5z\nYicaK2K2exs6Za18KrCxdyHjrZ6uvaKDzMmKHPxa7jzQUs/gu/47yi8+TSj6\nEJxoblH8+d19CbxzepufY4CjXxQPyoJ8dLOO+HwIaEsKTmg2QNDZmPYdJa5G\nREqgo1NKSj3Tn3mcCOG5pIrhcKEEOnjAHGbO3zP2K24/C9uIIZNRbwPA+nSI\nFRoYDjMJrgndDHQGr0TqLqxe3GW+liM9QxlD+4VbzprKYbPSMJLyRrF31oiL\nyXDo0nu3HN7jmPLAei1EBLPQEeEUgNChZVAda4Uby/mSmrPxLKI7JsoCutUJ\nle0+SbGxPDdPu7fs0b9x3aJWglgPWb+BlU8193wGsRSo9JvbFwj7sRA+ozdY\nQqAQWwK/iiSFpGV4pAtgwKFurQa00LrVyxRwQqmzee8Eaxq8iuntYIt4Pz4p\nAoP7f8Tbpnf1mgsj7tepozfcILem9UJpUNKpG96M/doN+mCxT+2TcLIJtY2r\ncuInOb2kSoqHlhcWAst3jx8DAKsVEOgFTLeeSOaPanWi8C/EO1hCdNLcLoPh\nnW98/901hHn9ncdShP0k/Ln3C6LUWOIymouDbV1x9uz7OC2wcCxfkqoMrSFY\n4JG9\r\n=88R6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq4/uNNlXCV0QeyRZiI+Dkh8EC18zkVE1cyoRLyNLTygIgJDLlIlccFcMhgDTwvKKHVAdtDB6up2DN/UXq0XrK4Xw="}]},"maintainers":[{"name":"mvasilkov","email":"mvasilkov@gmail.com"}],"_npmUser":{"name":"mvasilkov","email":"mvasilkov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/human-readable_0.2.1_1582292833844_0.4058863361180154"},"_hasShrinkwrap":false}},"readme":"human-readable\n===\n\nPresenting values in human-readable form.\n\n[![npm][npm-badge]][npm-url]\n[![no dependencies][dependencies-badge]][dependencies-url]\n\n---\n\nInstallation\n---\n\n```sh\nnpm add human-readable\n```\n\nUsage\n---\n\n### Size formatter\n\n```javascript\nimport { sizeFormatter } from 'human-readable'\n\nconst format = sizeFormatter({\n    std: 'JEDEC', // 'SI' (default) | 'IEC' | 'JEDEC'\n    decimalPlaces: 2,\n    keepTrailingZeroes: false,\n    render: (literal, symbol) => `${literal} ${symbol}B`,\n})\n\nformat(4096) // '4 KB'\n\nconst defaults = sizeFormatter()\n\ndefaults(4096) // '4.1 kB'\n```\n\n### Duration formatter\n\n```javascript\nimport { durationFormatter } from 'human-readable'\n\nconst span = Date.now() - Date.parse('2019-01-01T09:00:00.000+0200')\n\nconst format = durationFormatter({\n    // 'y' | 'mo' | 'w' | 'd' | 'h' | 'm' | 's' | 'ms'\n    allowMultiples: ['y', 'mo', 'd'],\n    keepNonLeadingZeroes: false, // E.g. '1y 0mo 0d'\n})\n\nformat(span) // '1y 1mo 19d'\n\nconst defaults = durationFormatter()\n\ndefaults(span) // '1y 1mo 19d 19h 41m 48s'\n```\n\nDisk size units\n---\n\n| Decimal | [SI][si] | Binary | [IEC][iec] | [JEDEC][jedec]\n| --- | --- | --- | --- | ---\n| (10<sup>3</sup>)<sup>1</sup> | kB | (2<sup>10</sup>)<sup>1</sup> | KiB | KB\n| (10<sup>3</sup>)<sup>2</sup> | MB | (2<sup>10</sup>)<sup>2</sup> | MiB | MB\n| (10<sup>3</sup>)<sup>3</sup> | GB | (2<sup>10</sup>)<sup>3</sup> | GiB | GB\n| (10<sup>3</sup>)<sup>4</sup> | TB | (2<sup>10</sup>)<sup>4</sup> | TiB | TB\n| (10<sup>3</sup>)<sup>5</sup> | PB | (2<sup>10</sup>)<sup>5</sup> | PiB | PB\n\nLicense\n---\n\nMIT\n\n[npm-badge]: https://img.shields.io/npm/v/human-readable.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/human-readable\n[dependencies-badge]: https://img.shields.io/david/mvasilkov/human-readable?style=flat\n[dependencies-url]: https://www.npmjs.com/package/human-readable?activeTab=dependencies\n[iec]: http://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-01-27\n[si]: http://www.electropedia.org/iev/iev.nsf/display?openform&ievref=112-02-03\n[jedec]: https://www.jedec.org/standards-documents/dictionary/terms/kilo-k-prefix-units-semiconductor-storage-capacity\n","maintainers":[{"name":"mvasilkov","email":"mvasilkov@gmail.com"}],"time":{"modified":"2022-05-05T10:35:03.004Z","created":"2017-11-07T08:18:17.108Z","0.0.1":"2017-11-07T08:18:17.108Z","0.1.0":"2019-10-02T15:33:54.202Z","0.2.0":"2020-02-20T19:16:18.306Z","0.2.1":"2020-02-21T13:47:13.978Z"},"homepage":"https://github.com/mvasilkov/human-readable#readme","repository":{"type":"git","url":"git+ssh://git@github.com/mvasilkov/human-readable.git"},"author":{"name":"Mark Vasilkov","url":"https://github.com/mvasilkov"},"bugs":{"url":"https://github.com/mvasilkov/human-readable/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["format","filesize","iec","jedec","readable","no-dependencies"]}