| { |
| "_args": [ |
| [ |
| { |
| "raw": "media-typer@0.3.0", |
| "scope": null, |
| "escapedName": "media-typer", |
| "name": "media-typer", |
| "rawSpec": "0.3.0", |
| "spec": "0.3.0", |
| "type": "version" |
| }, |
| "/Users/steveng/repo/cordova/cordova-browser/node_modules/type-is" |
| ] |
| ], |
| "_from": "media-typer@0.3.0", |
| "_id": "media-typer@0.3.0", |
| "_inCache": true, |
| "_location": "/media-typer", |
| "_npmUser": { |
| "name": "dougwilson", |
| "email": "doug@somethingdoug.com" |
| }, |
| "_npmVersion": "1.4.21", |
| "_phantomChildren": {}, |
| "_requested": { |
| "raw": "media-typer@0.3.0", |
| "scope": null, |
| "escapedName": "media-typer", |
| "name": "media-typer", |
| "rawSpec": "0.3.0", |
| "spec": "0.3.0", |
| "type": "version" |
| }, |
| "_requiredBy": [ |
| "/type-is" |
| ], |
| "_resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", |
| "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748", |
| "_shrinkwrap": null, |
| "_spec": "media-typer@0.3.0", |
| "_where": "/Users/steveng/repo/cordova/cordova-browser/node_modules/type-is", |
| "author": { |
| "name": "Douglas Christopher Wilson", |
| "email": "doug@somethingdoug.com" |
| }, |
| "bugs": { |
| "url": "https://github.com/jshttp/media-typer/issues" |
| }, |
| "dependencies": {}, |
| "description": "Simple RFC 6838 media type parser and formatter", |
| "devDependencies": { |
| "istanbul": "0.3.2", |
| "mocha": "~1.21.4", |
| "should": "~4.0.4" |
| }, |
| "directories": {}, |
| "dist": { |
| "shasum": "8710d7af0aa626f8fffa1ce00168545263255748", |
| "tarball": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" |
| }, |
| "engines": { |
| "node": ">= 0.6" |
| }, |
| "files": [ |
| "LICENSE", |
| "HISTORY.md", |
| "index.js" |
| ], |
| "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16", |
| "homepage": "https://github.com/jshttp/media-typer#readme", |
| "license": "MIT", |
| "maintainers": [ |
| { |
| "name": "dougwilson", |
| "email": "doug@somethingdoug.com" |
| } |
| ], |
| "name": "media-typer", |
| "optionalDependencies": {}, |
| "readme": "# media-typer\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\nSimple RFC 6838 media type parser\n\n## Installation\n\n```sh\n$ npm install media-typer\n```\n\n## API\n\n```js\nvar typer = require('media-typer')\n```\n\n### typer.parse(string)\n\n```js\nvar obj = typer.parse('image/svg+xml; charset=utf-8')\n```\n\nParse a media 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 type of the media type (always lower case). Example: `'image'`\n\n - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`\n\n - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`\n\n - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`\n\n### typer.parse(req)\n\n```js\nvar obj = typer.parse(req)\n```\n\nParse the `content-type` header from the given `req`. Short-cut for\n`typer.parse(req.headers['content-type'])`.\n\n### typer.parse(res)\n\n```js\nvar obj = typer.parse(res)\n```\n\nParse the `content-type` header set on the given `res`. Short-cut for\n`typer.parse(res.getHeader('content-type'))`.\n\n### typer.format(obj)\n\n```js\nvar obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})\n```\n\nFormat an object into a media type string. This will return a string of the\nmime type for the given object. For the properties of the object, see the\ndocumentation for `typer.parse(string)`.\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat\n[npm-url]: https://npmjs.org/package/media-typer\n[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/media-typer\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/media-typer\n[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat\n[downloads-url]: https://npmjs.org/package/media-typer\n", |
| "readmeFilename": "README.md", |
| "repository": { |
| "type": "git", |
| "url": "git+https://github.com/jshttp/media-typer.git" |
| }, |
| "scripts": { |
| "test": "mocha --reporter spec --check-leaks --bail test/", |
| "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", |
| "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" |
| }, |
| "version": "0.3.0" |
| } |