package.json 5.58 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
{
  "_args": [
    [
      {
        "raw": "content-type@~1.0.2",
        "scope": null,
        "escapedName": "content-type",
        "name": "content-type",
        "rawSpec": "~1.0.2",
        "spec": ">=1.0.2 <1.1.0",
        "type": "range"
      },
      "C:\\Users\\Giuliano\\Desktop\\nasaproject\\node_modules\\express"
    ]
  ],
  "_from": "content-type@>=1.0.2 <1.1.0",
  "_id": "content-type@1.0.2",
  "_inCache": true,
  "_location": "/content-type",
  "_nodeVersion": "4.4.3",
  "_npmOperationalInternal": {
    "host": "packages-12-west.internal.npmjs.com",
    "tmp": "tmp/content-type-1.0.2.tgz_1462852785748_0.5491233412176371"
  },
  "_npmUser": {
    "name": "dougwilson",
    "email": "doug@somethingdoug.com"
  },
  "_npmVersion": "2.15.1",
  "_phantomChildren": {},
  "_requested": {
    "raw": "content-type@~1.0.2",
    "scope": null,
    "escapedName": "content-type",
    "name": "content-type",
    "rawSpec": "~1.0.2",
    "spec": ">=1.0.2 <1.1.0",
    "type": "range"
  },
  "_requiredBy": [
    "/express"
  ],
  "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz",
  "_shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
  "_shrinkwrap": null,
  "_spec": "content-type@~1.0.2",
  "_where": "C:\\Users\\Giuliano\\Desktop\\nasaproject\\node_modules\\express",
  "author": {
    "name": "Douglas Christopher Wilson",
    "email": "doug@somethingdoug.com"
  },
  "bugs": {
    "url": "https://github.com/jshttp/content-type/issues"
  },
  "dependencies": {},
  "description": "Create and parse HTTP Content-Type header",
  "devDependencies": {
    "istanbul": "0.4.3",
    "mocha": "~1.21.5"
  },
  "directories": {},
  "dist": {
    "shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
    "tarball": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
  },
  "engines": {
    "node": ">= 0.6"
  },
  "files": [
    "LICENSE",
    "HISTORY.md",
    "README.md",
    "index.js"
  ],
  "gitHead": "8118763adfbbac80cf1254191889330aec8b8be7",
  "homepage": "https://github.com/jshttp/content-type#readme",
  "keywords": [
    "content-type",
    "http",
    "req",
    "res",
    "rfc7231"
  ],
  "license": "MIT",
  "maintainers": [
    {
      "name": "dougwilson",
      "email": "doug@somethingdoug.com"
    }
  ],
  "name": "content-type",
  "optionalDependencies": {},
  "readme": "# content-type\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nCreate and parse HTTP Content-Type header according to RFC 7231\n\n## Installation\n\n```sh\n$ npm install content-type\n```\n\n## API\n\n```js\nvar contentType = require('content-type')\n```\n\n### contentType.parse(string)\n\n```js\nvar obj = contentType.parse('image/svg+xml; charset=utf-8')\n```\n\nParse a content type string. This will return an object with the following\nproperties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):\n\n - `type`: The media type (the type and subtype, always lower case).\n   Example: `'image/svg+xml'`\n\n - `parameters`: An object of the parameters in the media type (name of parameter\n   always lower case). Example: `{charset: 'utf-8'}`\n\nThrows a `TypeError` if the string is missing or invalid.\n\n### contentType.parse(req)\n\n```js\nvar obj = contentType.parse(req)\n```\n\nParse the `content-type` header from the given `req`. Short-cut for\n`contentType.parse(req.headers['content-type'])`.\n\nThrows a `TypeError` if the `Content-Type` header is missing or invalid.\n\n### contentType.parse(res)\n\n```js\nvar obj = contentType.parse(res)\n```\n\nParse the `content-type` header set on the given `res`. Short-cut for\n`contentType.parse(res.getHeader('content-type'))`.\n\nThrows a `TypeError` if the `Content-Type` header is missing or invalid.\n\n### contentType.format(obj)\n\n```js\nvar str = contentType.format({type: 'image/svg+xml'})\n```\n\nFormat an object into a content type string. This will return a string of the\ncontent type for the given object with the following properties (examples are\nshown that produce the string `'image/svg+xml; charset=utf-8'`):\n\n - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`\n\n - `parameters`: An object of the parameters in the media type (name of the\n   parameter will be lower-cased). Example: `{charset: 'utf-8'}`\n\nThrows a `TypeError` if the object contains an invalid type or parameter names.\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/content-type.svg\n[npm-url]: https://npmjs.org/package/content-type\n[node-version-image]: https://img.shields.io/node/v/content-type.svg\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg\n[travis-url]: https://travis-ci.org/jshttp/content-type\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg\n[coveralls-url]: https://coveralls.io/r/jshttp/content-type\n[downloads-image]: https://img.shields.io/npm/dm/content-type.svg\n[downloads-url]: https://npmjs.org/package/content-type\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jshttp/content-type.git"
  },
  "scripts": {
    "test": "mocha --reporter spec --check-leaks --bail test/",
    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
  },
  "version": "1.0.2"
}