{"_id":"file-size","_rev":"19-e6797dac841442d894bfab469126aa3e","name":"file-size","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"file-size","version":"0.0.1","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","_id":"file-size@0.0.1","dist":{"shasum":"527b6ea198854b606093d4919130e0f2b7f954b0","tarball":"https://registry.npmjs.org/file-size/-/file-size-0.0.1.tgz","integrity":"sha512-3dHMXtvkZ1kZ7TflhW9jnemb48zQL71USJzzQ5GbuYaPou+vcKS2vA8rb5jOeHzDMZLJXq7I8nXx13FWPFF6Ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZ65wfeOFn7CDgtyGKLc9BpBcm4Y1ur2z3QCwWQmjXMAiBjw352+8Gjh87qTAKqgtIHrEivDAtw4fuAHHH72/4CHA=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}]},"0.0.2":{"name":"file-size","version":"0.0.2","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","_id":"file-size@0.0.2","dist":{"shasum":"25ff202352b7bd1bf5663e0f04a0e069bc01b2c0","tarball":"https://registry.npmjs.org/file-size/-/file-size-0.0.2.tgz","integrity":"sha512-NIzpbXI5P2GO2qZRc/el5Vp2vjgNdXjJaH3CL3ASkveX1tf1tSXdkBXsVSaX4zlLRfM0lI9dmUm+Yt/vhytlUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFadb5jtGfQ7fFxEw+X6lMwCRQZSXp2LPusRb4TZYLExAiB2Ca1tGpKenW5+1vSNi+HFwqhMvsXyztT87V5qzGS8tQ=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}]},"0.0.3":{"name":"file-size","version":"0.0.3","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/Nijikokun/file-size/issues"},"_id":"file-size@0.0.3","dist":{"shasum":"028cdb5bfedada7a69fc0971ce10ac0ba20f305e","tarball":"https://registry.npmjs.org/file-size/-/file-size-0.0.3.tgz","integrity":"sha512-rNGV+lMo/AssVCFMM1mBcgyj81VXmuyLs47JKxua3AzwSmE2RCt2IhzV2ycNSZ/lRyP1noUMXX4UCbrn/2wwlQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBU/YB7bdNu7YUOc9smbf7QilEjwdZg5hsFvVI2sPcB+AiBe2Cx2twzZolxeYhmVZRxrQBPmFjM1Xm14rkk4hO+w5A=="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}]},"0.0.4":{"name":"file-size","version":"0.0.4","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"mocha --reporter dot --check-leaks test/"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","devDependencies":{"mocha":"^1.20.1","should":"^4.0.1"},"bugs":{"url":"https://github.com/Nijikokun/file-size/issues"},"homepage":"https://github.com/Nijikokun/file-size","_id":"file-size@0.0.4","dist":{"shasum":"c3703b1def3a7c503b8f0d12caf848a6e4522037","tarball":"https://registry.npmjs.org/file-size/-/file-size-0.0.4.tgz","integrity":"sha512-G9C+NaYOUDCGRwILhexdWJSjhXI3LrxuV2OLCi7Wp4GJ5U5VYbhMNr5JGztlZoajOQ/6UBor9spJ0tyaQ6P7HA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVSBxqEOi8wX1lxCa/LK692wqa1BNAq8oaGHk2yi23KAiBeJU9RGOpGtTHZLqgq1uLefFvUHS4Yg4kYfmEvF6o73g=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}]},"0.0.5":{"name":"file-size","version":"0.0.5","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"mocha --reporter dot --check-leaks test/"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","devDependencies":{"mocha":"^1.20.1","should":"^4.0.1"},"bugs":{"url":"https://github.com/Nijikokun/file-size/issues"},"homepage":"https://github.com/Nijikokun/file-size","_id":"file-size@0.0.5","dist":{"shasum":"057d43c3a3ed735da3f90d6052ab380f1e6d5e3b","tarball":"https://registry.npmjs.org/file-size/-/file-size-0.0.5.tgz","integrity":"sha512-ZW056dw8Ta1RWHVOQue3LMZe+mSOnHkcM7AN9is8JoHSIHRiLD5szwPAHM3fM7P5SGJ1bkAmCv3PvUTGoluDqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG1ToZxQishgtc9r+j6U8iZj7Zm4feNEJR/hK2Hh4VAgIgNn8g1cmsF4MlA535HvB60Zo7bAoTF2hBe4synKotttM="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}]},"1.0.0":{"name":"file-size","version":"1.0.0","description":"Lightweight filesize to human-readable / proportions w/o dependencies.","main":"index.js","scripts":{"test":"make test","coverage":"make coverage"},"keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec","filesystem","humanize","numbers"],"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"license":"MIT","devDependencies":{"istanbul":"^0.3.13","mocha":"^1.20.1","should":"^4.0.1"},"gitHead":"78fb74cd714ee2b37a3328dafe63b74234121503","bugs":{"url":"https://github.com/Nijikokun/file-size/issues"},"homepage":"https://github.com/Nijikokun/file-size","_id":"file-size@1.0.0","_shasum":"3338267d5d206bbf60f4df60c19d7ed3813a4657","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.28","_npmUser":{"name":"nijikokun","email":"nijikokun@gmail.com"},"maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}],"dist":{"shasum":"3338267d5d206bbf60f4df60c19d7ed3813a4657","tarball":"https://registry.npmjs.org/file-size/-/file-size-1.0.0.tgz","integrity":"sha512-tLIdonWTpABkU6Axg2yGChYdrOsy4V8xcm0IcyAP8fSsu6jiXLm5pgs083e4sq5fzNRZuAYolUbZyYmPvCKfwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyOsUgiLvdSvERWR+lLk/+wLccIPAm56HYEUkOHrWYDwIhAN2D6DcE0yfnZO/So5+Ln0MJcVZXX9ofmuBhDo1jlYUT"}]}}},"readme":"# File-size.js\n\n![filesize](http://puu.sh/5JspS.png)\n\nFile-size module for node.js for converting, manipulating, and handling file-sizes.\n\n\n## Features\n\n- Zero Dependencies.\n- Supports IEC (power `1024`, _default_), SI (power `1000`), and JEDEC (Alternative SI Unit Notation).\n- Conversion from `bytes` to `K`, `M`, `G`, and so forth...\n- Customizable human-readable output.\n\n## Installation\n\n```bash\n$ npm install file-size\n```\n\nNow require it in your files like so:\n\n```javascript\nvar filesize = require('file-size');\n```\n\n## Usage\n\n```javascript\nfilesize(Number bytes, Object options)\n```\n\nUsing filesize is very easy, a lot easier if you know the [Specification Table](http://en.wikipedia.org/wiki/Template:Quantities_of_bytes). However,\nit's not required to know it, and in most cases you won't need it.\n\n\n**Initialization**\n\nFilesize works in a jQuery chainable manner so you can use multiple instances without trouble.\n\n```javascript\nvar size = filesize(186457865);\n```\n\n**Options**\n\n```javascript\nvar size = filesize(186457865, {\n  fixed: 2,\n  spacer: ' '\n});\n```\n\n- `fixed` - Number of positions after the decimal to show, default is `2`\n- `spacer` - Space between the number and the unit, default is a space ` `\n\n### size.human(String spec) -> String\n\nGenerates human readable filesize.\n\n- `spec` can be one of the following:\n  - `si`\n  - `iec`\n  - `jedec`\n\n##### IEC Specification\n\n*Default*\n\nPower of `1024`\n\n```javascript\n// outputs: 177.82 MiB\nfilesize(186457865).human();\n```\n\n##### SI Specification\n\nPower of `1000`\n\n```javascript\n// outputs: 186.46 MB\nfilesize(186457865).human('si');\n```\n\n##### JEDEC Specification\n\nChanges IEC default unit notation `iB` to `B` for the following: `KB`, `MB`, `GB`\n\nThe rest are in `iB` notation, as per JEDEC Specification.\n\n```javascript\n// outputs: 186.46 MB\nfilesize(186457865).human('jedec');\n```\n\n### size.to(String unit, String spec) -> String\n\nConverts `bytes` to another filesize `unit`\n\n- `unit` of size can be one of the following:\n  - `B`, `KB`, `MB`, `GB`, `TB`, `PB`, `EB`, `ZB`, `YB`\n- `spec` can be one of the following:\n  - `si`\n  - `iec`\n  - `jedec`\n\n##### IEC Specification\n\n*Default*\n\n```javascript\n// outputs: 177.82\nfilesize(186457865).to('MB');\n```\n\n##### SI Specification\n\n```javascript\n// outputs: 186.46\nfilesize(186457865).to('MB', true);\n```\n\n### size.calculate(String spec) -> Object\n\nCalculates suffix, magnitude, fixed, non-fixed, bits (fixed, non-fixed) from specified bytes against the specified `spec`.\n\n- `spec` can be one of the following:\n  - `si`\n  - `iec`\n  - `jedec`\n\n```js\n/*\n * outputs:\n *\n *    {\n *      suffix: 'Bytes',\n *      magnitude: 0,\n *      result: 8,\n *      fixed: '8.00',\n *      bits: { result: 1, fixed: '1.00' }\n *    }\n*/\n\nvar result = filesize(8).calculate()\n```","maintainers":[{"name":"nijikokun","email":"nijikokun@gmail.com"}],"time":{"modified":"2022-06-18T00:38:52.661Z","created":"2013-12-09T08:46:39.244Z","0.0.1":"2013-12-09T08:46:40.004Z","0.0.2":"2013-12-10T20:08:05.546Z","0.0.3":"2013-12-16T23:04:53.908Z","0.0.4":"2014-06-04T19:42:00.447Z","0.0.5":"2014-06-04T19:45:30.718Z","1.0.0":"2015-04-05T06:50:21.829Z"},"author":{"name":"Nijiko Yonskai","email":"nijikokun@gmail.com"},"repository":{"type":"git","url":"git://github.com/Nijikokun/file-size.git"},"homepage":"https://github.com/Nijikokun/file-size","keywords":["filesize","file","size","bytes","human","readable","iec","si","jedec","filesystem","humanize","numbers"],"bugs":{"url":"https://github.com/Nijikokun/file-size/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"f124275809":true,"wenbing":true,"edin-m":true,"kreozot":true,"ux_web":true}}