| { |
| "_args": [ |
| [ |
| { |
| "raw": "bytes@3.0.0", |
| "scope": null, |
| "escapedName": "bytes", |
| "name": "bytes", |
| "rawSpec": "3.0.0", |
| "spec": "3.0.0", |
| "type": "version" |
| }, |
| "/Users/steveng/repo/cordova/cordova-browser/node_modules/compression" |
| ] |
| ], |
| "_from": "bytes@3.0.0", |
| "_id": "bytes@3.0.0", |
| "_inCache": true, |
| "_location": "/bytes", |
| "_nodeVersion": "6.11.1", |
| "_npmOperationalInternal": { |
| "host": "s3://npm-registry-packages", |
| "tmp": "tmp/bytes-3.0.0.tgz_1504216364188_0.5158762519713491" |
| }, |
| "_npmUser": { |
| "name": "dougwilson", |
| "email": "doug@somethingdoug.com" |
| }, |
| "_npmVersion": "3.10.10", |
| "_phantomChildren": {}, |
| "_requested": { |
| "raw": "bytes@3.0.0", |
| "scope": null, |
| "escapedName": "bytes", |
| "name": "bytes", |
| "rawSpec": "3.0.0", |
| "spec": "3.0.0", |
| "type": "version" |
| }, |
| "_requiredBy": [ |
| "/body-parser", |
| "/compression", |
| "/raw-body" |
| ], |
| "_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", |
| "_shasum": "d32815404d689699f85a4ea4fa8755dd13a96048", |
| "_shrinkwrap": null, |
| "_spec": "bytes@3.0.0", |
| "_where": "/Users/steveng/repo/cordova/cordova-browser/node_modules/compression", |
| "author": { |
| "name": "TJ Holowaychuk", |
| "email": "tj@vision-media.ca", |
| "url": "http://tjholowaychuk.com" |
| }, |
| "bugs": { |
| "url": "https://github.com/visionmedia/bytes.js/issues" |
| }, |
| "contributors": [ |
| { |
| "name": "Jed Watson", |
| "email": "jed.watson@me.com" |
| }, |
| { |
| "name": "Théo FIDRY", |
| "email": "theo.fidry@gmail.com" |
| } |
| ], |
| "dependencies": {}, |
| "description": "Utility to parse a string bytes to bytes and vice-versa", |
| "devDependencies": { |
| "mocha": "2.5.3", |
| "nyc": "10.3.2" |
| }, |
| "directories": {}, |
| "dist": { |
| "shasum": "d32815404d689699f85a4ea4fa8755dd13a96048", |
| "tarball": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" |
| }, |
| "engines": { |
| "node": ">= 0.8" |
| }, |
| "files": [ |
| "History.md", |
| "LICENSE", |
| "Readme.md", |
| "index.js" |
| ], |
| "gitHead": "25d4cb488aea3b637448a85fa297d9e65b4b4e04", |
| "homepage": "https://github.com/visionmedia/bytes.js#readme", |
| "keywords": [ |
| "byte", |
| "bytes", |
| "utility", |
| "parse", |
| "parser", |
| "convert", |
| "converter" |
| ], |
| "license": "MIT", |
| "maintainers": [ |
| { |
| "name": "dougwilson", |
| "email": "doug@somethingdoug.com" |
| }, |
| { |
| "name": "tjholowaychuk", |
| "email": "tj@vision-media.ca" |
| } |
| ], |
| "name": "bytes", |
| "optionalDependencies": {}, |
| "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[![Test Coverage][coveralls-image]][coveralls-url]\n\nUtility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```bash\n$ npm install bytes\n```\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| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |\n| unitSeparator | `string`|`null` | Separator to use between number and unit. 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\nbytes(1024, {unitSeparator: ' '});\n// output: '1 KB'\n\n```\n\n#### bytes.parse(string|number value): number|null\n\nParse the string value into an integer in bytes. If no unit is given, or `value`\nis a number, it is assumed the value is in bytes.\n\nSupported units and abbreviations are as follows and are case-insensitive:\n\n * `b` for bytes\n * `kb` for kilobytes\n * `mb` for megabytes\n * `gb` for gigabytes\n * `tb` for terabytes\n\nThe units are in powers of two, not ten. This means 1kb = 1024b according to this parser.\n\n**Arguments**\n\n| Name | Type | Description |\n|---------------|--------|--------------------|\n| value | `string`|`number` | String to parse, or number in bytes. |\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\nbytes(1024);\n// output: 1024\n```\n\n## License \n\n[MIT](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[coveralls-image]: https://img.shields.io/coveralls/visionmedia/bytes.js/master.svg\n[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master\n", |
| "readmeFilename": "Readme.md", |
| "repository": { |
| "type": "git", |
| "url": "git+https://github.com/visionmedia/bytes.js.git" |
| }, |
| "scripts": { |
| "test": "mocha --check-leaks --reporter spec", |
| "test-ci": "nyc --reporter=text npm test", |
| "test-cov": "nyc --reporter=html --reporter=text npm test" |
| }, |
| "version": "3.0.0" |
| } |