package.json 6.09 KB
Newer Older
Muddsair Sharif's avatar
Muddsair Sharif committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
  "_args": [
    [
      {
        "raw": "bytes@2.4.0",
        "scope": null,
        "escapedName": "bytes",
        "name": "bytes",
        "rawSpec": "2.4.0",
        "spec": "2.4.0",
        "type": "version"
      },
      "C:\\Users\\Giuliano\\Desktop\\nasaproject\\project2\\node_modules\\body-parser"
    ]
  ],
  "_from": "bytes@2.4.0",
  "_id": "bytes@2.4.0",
  "_inCache": true,
  "_location": "/bytes",
  "_npmOperationalInternal": {
    "host": "packages-16-east.internal.npmjs.com",
    "tmp": "tmp/bytes-2.4.0.tgz_1464812473023_0.6271433881483972"
  },
  "_npmUser": {
    "name": "dougwilson",
    "email": "doug@somethingdoug.com"
  },
  "_npmVersion": "1.4.28",
  "_phantomChildren": {},
  "_requested": {
    "raw": "bytes@2.4.0",
    "scope": null,
    "escapedName": "bytes",
    "name": "bytes",
    "rawSpec": "2.4.0",
    "spec": "2.4.0",
    "type": "version"
  },
  "_requiredBy": [
    "/body-parser",
    "/raw-body"
  ],
  "_resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz",
  "_shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339",
  "_shrinkwrap": null,
  "_spec": "bytes@2.4.0",
  "_where": "C:\\Users\\Giuliano\\Desktop\\nasaproject\\project2\\node_modules\\body-parser",
  "author": {
    "name": "TJ Holowaychuk",
    "email": "tj@vision-media.ca",
    "url": "http://tjholowaychuk.com"
  },
  "bugs": {
    "url": "https://github.com/visionmedia/bytes.js/issues"
  },
  "component": {
    "scripts": {
      "bytes/index.js": "index.js"
    }
  },
  "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": "1.21.5"
  },
  "directories": {},
  "dist": {
    "shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339",
    "tarball": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz"
  },
  "files": [
    "History.md",
    "LICENSE",
    "Readme.md",
    "index.js"
  ],
  "gitHead": "2a598442bdfa796df8d01a96cc54495cda550e70",
  "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\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| 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 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\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` | 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[![npm](https://img.shields.io/npm/l/express.svg)](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",
  "readmeFilename": "Readme.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/visionmedia/bytes.js.git"
  },
  "scripts": {
    "test": "mocha --check-leaks --reporter spec"
  },
  "version": "2.4.0"
}