yunlongzha_try_nodejs
Version:
try it
1 lines • 15.6 kB
JSON
{"_id":"bytes","_rev":"34-ea1a272da5b5d3459113b03f2ad93bdb","name":"bytes","description":"Utility to parse a string bytes to bytes and vice-versa","dist-tags":{"latest":"2.2.0"},"versions":{"0.0.1":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte string parser (5mb etc)","version":"0.0.1","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"_id":"bytes@0.0.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"2a76c866ba90e6fd2641ab5c9fdb6c4e8b4015f7","tarball":"http://registry.npmjs.org/bytes/-/bytes-0.0.1.tgz"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.1.0":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte size string parser / serializer","version":"0.1.0","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"component":{"scripts":{"bytes":"index.js"}},"_id":"bytes@0.1.0","dist":{"shasum":"c574812228126d6369d1576925a8579db3f8e5a2","tarball":"http://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.2.0":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte size string parser / serializer","version":"0.2.0","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"_id":"bytes@0.2.0","dist":{"shasum":"aad33ec14e3dc2ca74e8e7d451f9ba053ad4f7a0","tarball":"http://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz"},"_npmVersion":"1.1.64","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.2.1":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte size string parser / serializer","version":"0.2.1","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"component":{"scripts":{"bytes/index.js":"index.js"}},"_id":"bytes@0.2.1","dist":{"shasum":"555b08abcb063f8975905302523e4cd4ffdfdf31","tarball":"http://registry.npmjs.org/bytes/-/bytes-0.2.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.3.0":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte size string parser / serializer","repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js.git"},"version":"0.3.0","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"component":{"scripts":{"bytes/index.js":"index.js"}},"bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@0.3.0","dist":{"shasum":"78e2e0e28c7f9c7b988ea8aee0db4d5fa9941935","tarball":"http://registry.npmjs.org/bytes/-/bytes-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"1.0.0":{"name":"bytes","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"description":"byte size string parser / serializer","repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js.git"},"version":"1.0.0","main":"index.js","dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"component":{"scripts":{"bytes/index.js":"index.js"}},"bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@1.0.0","dist":{"shasum":"3569ede8ba34315fab99c3e92cb04c7220de1fa8","tarball":"http://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"2.0.0":{"name":"bytes","version":"2.0.0","description":"Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.","keywords":["byte","bytes","utility","parse","parser","convert","converter"],"repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js.git"},"bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"main":"index.js","component":{"scripts":{"bytes/index.js":"index.js"}},"scripts":{"test":"node_modules/mocha/bin/mocha --check-leaks"},"dependencies":{"node.extend":"*"},"devDependencies":{"chai":"*","mocha":"*"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"michaelsanford","url":"https://medium.com/@msanford"},{"name":"vladikoff","email":"github@vf.io","url":"http://vf.io"},{"name":"justindeguzman","url":"http://justindeguzman.net"},{"name":"mixu","url":"http://mixu.net"},{"name":"theofidry","email":"theo.fidry@gmail.com","url":"https://github.com/theofidry"}],"license":"MIT","gitHead":"6b0e590f1aa83a43b20b4678441cba883f06d6fd","homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@2.0.0","_shasum":"37feb25b3478674e7b78a16720826b033459a6ff","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"37feb25b3478674e7b78a16720826b033459a6ff","tarball":"http://registry.npmjs.org/bytes/-/bytes-2.0.0.tgz"},"directories":{}},"2.0.1":{"name":"bytes","version":"2.0.1","description":"Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.","keywords":["byte","bytes","utility","parse","parser","convert","converter"],"repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js.git"},"bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"main":"index.js","component":{"scripts":{"bytes/index.js":"index.js"}},"scripts":{"test":"mocha --check-leaks --reporter spec"},"devDependencies":{"chai":"*","mocha":"*"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"michaelsanford","url":"https://medium.com/@msanford"},{"name":"vladikoff","email":"github@vf.io","url":"http://vf.io"},{"name":"justindeguzman","url":"http://justindeguzman.net"},{"name":"mixu","url":"http://mixu.net"},{"name":"theofidry","email":"theo.fidry@gmail.com","url":"https://github.com/theofidry"}],"files":["lib/","History.md","LICENSE","Readme.md","index.js"],"license":"MIT","gitHead":"8c00b7361081cbd9bbefdeaac387cfa3483ee584","homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@2.0.1","_shasum":"673743059be43d929f9c225dd7363ee0f8b15d97","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"673743059be43d929f9c225dd7363ee0f8b15d97","tarball":"http://registry.npmjs.org/bytes/-/bytes-2.0.1.tgz"},"directories":{}},"2.0.2":{"name":"bytes","description":"Utility to parse a string bytes to bytes and vice-versa","version":"2.0.2","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"Jed Watson","email":"jed.watson@me.com"}],"license":"MIT","keywords":["byte","bytes","utility","parse","parser","convert","converter"],"repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js"},"component":{"scripts":{"bytes/index.js":"index.js"}},"devDependencies":{"mocha":"*"},"files":["lib/","History.md","LICENSE","Readme.md","index.js"],"scripts":{"test":"mocha --check-leaks --reporter spec"},"gitHead":"613ebfa44c8e42ae107833e1a587f6a3349f6a64","bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@2.0.2","_shasum":"580fea1111c2df039f2644ff917ce4010501184e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"580fea1111c2df039f2644ff917ce4010501184e","tarball":"http://registry.npmjs.org/bytes/-/bytes-2.0.2.tgz"},"directories":{}},"2.1.0":{"name":"bytes","description":"Utility to parse a string bytes to bytes and vice-versa","version":"2.1.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"Jed Watson","email":"jed.watson@me.com"}],"license":"MIT","keywords":["byte","bytes","utility","parse","parser","convert","converter"],"repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js"},"component":{"scripts":{"bytes/index.js":"index.js"}},"devDependencies":{"mocha":"*"},"files":["History.md","LICENSE","Readme.md","index.js"],"scripts":{"test":"mocha --check-leaks --reporter spec"},"gitHead":"86e4520cc369b34866154a53344ca50b2bb5ddcd","bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@2.1.0","_shasum":"ac93c410e2ffc9cc7cf4b464b38289067f5e47b4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"ac93c410e2ffc9cc7cf4b464b38289067f5e47b4","tarball":"http://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz"},"directories":{}},"2.2.0":{"name":"bytes","description":"Utility to parse a string bytes to bytes and vice-versa","version":"2.2.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"Jed Watson","email":"jed.watson@me.com"},{"name":"Théo FIDRY","email":"theo.fidry@gmail.com"}],"license":"MIT","keywords":["byte","bytes","utility","parse","parser","convert","converter"],"repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js"},"component":{"scripts":{"bytes/index.js":"index.js"}},"devDependencies":{"mocha":"1.21.5"},"files":["History.md","LICENSE","Readme.md","index.js"],"scripts":{"test":"mocha --check-leaks --reporter spec"},"gitHead":"509a01a5472b9163ae5a7db41e2d6bd986fdf595","bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"homepage":"https://github.com/visionmedia/bytes.js","_id":"bytes@2.2.0","_shasum":"fd35464a403f6f9117c2de3609ecff9cae000588","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"fd35464a403f6f9117c2de3609ecff9cae000588","tarball":"http://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz"},"directories":{}}},"readme":"# Bytes utility\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n\nUtility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.\n\n## Usage\n\n```js\nvar bytes = require('bytes');\n```\n\n#### bytes.format(number value, [options]): string|null\n\nFormat the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is\n rounded.\n\n**Arguments**\n\n| Name | Type | Description |\n|---------|--------|--------------------|\n| value | `number` | Value in bytes |\n| options | `Object` | Conversion options |\n\n**Options**\n\n| Property | Type | Description |\n|-------------------|--------|-----------------------------------------------------------------------------------------|\n| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. |\n| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` |\n| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `' '`. |\n\n**Returns**\n\n| Name | Type | Description |\n|---------|-------------|-------------------------|\n| results | `string`|`null` | Return null upon error. String value otherwise. |\n\n**Example**\n\n```js\nbytes(1024);\n// output: '1kB'\n\nbytes(1000);\n// output: '1000B'\n\nbytes(1000, {thousandsSeparator: ' '});\n// output: '1 000B'\n\nbytes(1024 * 1.7, {decimalPlaces: 0});\n// output: '2kB'\n```\n\n#### bytes.parse(string value): number|null\n\nParse the string value into an integer in bytes. If no unit is given, it is assumed the value is in bytes.\n\n**Arguments**\n\n| Name | Type | Description |\n|---------------|--------|--------------------|\n| value | `string` | String to parse. |\n\n**Returns**\n\n| Name | Type | Description |\n|---------|-------------|-------------------------|\n| results | `number`|`null` | Return null upon error. Value in bytes otherwise. |\n\n**Example**\n\n```js\nbytes('1kB');\n// output: 1024\n\nbytes('1024');\n// output: 1024\n```\n\n## Installation\n\n```bash\nnpm install bytes --save\ncomponent install visionmedia/bytes.js\n```\n\n## License \n\n[](https://github.com/visionmedia/bytes.js/blob/master/LICENSE)\n\n[downloads-image]: https://img.shields.io/npm/dm/bytes.svg\n[downloads-url]: https://npmjs.org/package/bytes\n[npm-image]: https://img.shields.io/npm/v/bytes.svg\n[npm-url]: https://npmjs.org/package/bytes\n[travis-image]: https://img.shields.io/travis/visionmedia/bytes.js/master.svg\n[travis-url]: https://travis-ci.org/visionmedia/bytes.js\n","maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"time":{"modified":"2015-11-14T01:44:07.135Z","created":"2012-06-11T15:44:32.849Z","0.0.1":"2012-06-11T15:44:34.095Z","0.1.0":"2012-08-17T19:26:03.899Z","0.2.0":"2012-10-28T07:40:18.125Z","0.2.1":"2013-04-01T18:48:09.764Z","0.3.0":"2014-03-20T01:08:49.952Z","1.0.0":"2014-05-05T23:52:20.318Z","2.0.0":"2015-04-12T21:04:54.307Z","2.0.1":"2015-05-08T04:43:03.189Z","2.0.2":"2015-05-21T03:19:26.235Z","2.1.0":"2015-05-22T02:55:58.116Z","2.2.0":"2015-11-14T01:44:07.135Z"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"users":{"m42am":true,"purywp":true,"cshao":true,"qqqppp9998":true,"honzajde":true,"fotooo":true,"moimikey":true},"readmeFilename":"Readme.md","homepage":"https://github.com/visionmedia/bytes.js","repository":{"type":"git","url":"https://github.com/visionmedia/bytes.js"},"bugs":{"url":"https://github.com/visionmedia/bytes.js/issues"},"keywords":["byte","bytes","utility","parse","parser","convert","converter"],"contributors":[{"name":"Jed Watson","email":"jed.watson@me.com"},{"name":"Théo FIDRY","email":"theo.fidry@gmail.com"}],"license":"MIT","_attachments":{},"_etag":"\"9Z54CDPJPFB84A5EQY8A939AW\""}