{"_id":"@becquerel/content-negotiator","_rev":"3-7b26ca98db75a10fdbed8234d06b2282","name":"@becquerel/content-negotiator","description":"HTTP content negotiation library.","dist-tags":{"latest":"0.1.0-alpha.3"},"versions":{"0.1.0-alpha.1":{"name":"@becquerel/content-negotiator","version":"0.1.0-alpha.1","description":"HTTP content negotiation library.","engines":{"node":">=7.10"},"main":"./lib/index.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/becquerel-js/content-negotiator.git"},"keywords":["content","negotiation","http"],"author":{"name":"James Benner"},"license":"MIT","bugs":{"url":"https://github.com/becquerel-js/content-negotiator/issues"},"homepage":"https://github.com/becquerel-js/content-negotiator#readme","devDependencies":{"jasmine":"^2.6.0"},"gitHead":"b3677d053b04367b6f2f9d6dd01e7780f04a9066","_id":"@becquerel/content-negotiator@0.1.0-alpha.1","_npmVersion":"5.2.0","_nodeVersion":"8.1.4","_npmUser":{"name":"radioactivehamster","email":"james.benner@gmail.com"},"dist":{"integrity":"sha512-yhjH5HVFLlGgk+jtLLl9xGRm2Nti3TixNfeadWgBIDo9+3BY/wMM0Ss+ZByTwHfJiiQSd9VqJWYqnJNi+wnEuA==","shasum":"2b7782fd0a19b3000aed46a78bb4921669cb135b","tarball":"https://registry.npmjs.org/@becquerel/content-negotiator/-/content-negotiator-0.1.0-alpha.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgGivuV7/F4A/ligAGx/FTArIjwpYJLuxhUE8oDnioRAiAQNt74Nr693Hk3umbSpsaxmxbXAZqLmNqkKWmOMmzS5w=="}]},"maintainers":[{"name":"radioactivehamster","email":"james.benner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-negotiator-0.1.0-alpha.1.tgz_1499902872184_0.4643355954904109"}},"0.1.0-alpha.2":{"name":"@becquerel/content-negotiator","version":"0.1.0-alpha.2","description":"HTTP content negotiation library.","engines":{"node":">=7.10"},"main":"./lib/index.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/becquerel-js/content-negotiator.git"},"keywords":["content","negotiation","http"],"author":{"name":"James Benner"},"license":"MIT","bugs":{"url":"https://github.com/becquerel-js/content-negotiator/issues"},"homepage":"https://github.com/becquerel-js/content-negotiator#readme","devDependencies":{"jasmine":"^2.6.0"},"gitHead":"7cdc6814d760a665a0ac630cdd2bd1cbae6bc150","_id":"@becquerel/content-negotiator@0.1.0-alpha.2","_npmVersion":"5.2.0","_nodeVersion":"8.1.4","_npmUser":{"name":"radioactivehamster","email":"james.benner@gmail.com"},"dist":{"integrity":"sha512-6K7unWpBdYlfIAv4r+HLoc/ajJ5OTmBjYeP6NQTQSQ8wZzTFOKBQcK15/ZuZlAZrSOCTqRifFOTmGrA3ENXzsg==","shasum":"aade830514c418ceb56d1d1607824a189037ac42","tarball":"https://registry.npmjs.org/@becquerel/content-negotiator/-/content-negotiator-0.1.0-alpha.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDHsEwajMygzbMqUTBICfmd+Tb7CwvclEha12Nc7T8wbAiBZoWH9MeEtDG3dMKhHeE5daJZUNU5TJ0wkyjX6Q9kA6Q=="}]},"maintainers":[{"name":"radioactivehamster","email":"james.benner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-negotiator-0.1.0-alpha.2.tgz_1499907308196_0.557805227348581"}},"0.1.0-alpha.3":{"name":"@becquerel/content-negotiator","version":"0.1.0-alpha.3","description":"HTTP content negotiation library.","engines":{"node":">=7.10"},"main":"./lib/index.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/becquerel-js/content-negotiator.git"},"keywords":["content","negotiation","http"],"author":{"name":"James Benner"},"license":"MIT","bugs":{"url":"https://github.com/becquerel-js/content-negotiator/issues"},"homepage":"https://github.com/becquerel-js/content-negotiator#readme","devDependencies":{"jasmine":"^2.6.0"},"gitHead":"007c75905799f47a4a7cd6a0cb4208698f807951","_id":"@becquerel/content-negotiator@0.1.0-alpha.3","_npmVersion":"5.2.0","_nodeVersion":"8.1.4","_npmUser":{"name":"radioactivehamster","email":"james.benner@gmail.com"},"dist":{"integrity":"sha512-WD2/cVwYXuixpOiMu0VGyzPYpd2O46wz7Byu6Z7OJcOwOtKL8Xm3NtrC98xSz/2AoFGbvC0iX6pO3W6eybyMzA==","shasum":"08d55bddc0418de3980a6b82c2f3369fce1ea2a3","tarball":"https://registry.npmjs.org/@becquerel/content-negotiator/-/content-negotiator-0.1.0-alpha.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKdOQRNGIWSchRASs0IWaf+XnbQ/c8Ha+6LfMYk76l8wIgBzEd3/l65w7Q58ffkRJt4sCrPnY6u6vdKaR4mqC38jQ="}]},"maintainers":[{"name":"radioactivehamster","email":"james.benner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/content-negotiator-0.1.0-alpha.3.tgz_1499954861222_0.30565140885300934"}}},"readme":"@becquerel/content-negotiator\n=============================\n[![npm Version][NPM VERSION BADGE]][NPM PAGE]\n[![Node.js][NODE VERSION BADGE]][NODE PAGE]\n[![GitHub License][LICENSE BADGE]][LICENSE PAGE]\n[![Build Status][BUILD BADGE]][BUILD PAGE]\n\nHTTP content negotiation library.\n\nInstall\n-------\n```sh\n$ npm install --save @becquerel/content-negotiator  # Or alternately: `yarn add @becquerel/content-negotiator`\n```\n\nUsage\n-----\n```js\nconst ContentNegotiator = require('@becquerel/content-negotiator');\n\nlet acceptHeader = 'text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c';\nlet negotiator = new ContentNegotiator(acceptHeader);\n\n/**\n * Use the `.prefer()` method to check if a media type is the prefered type of\n * the requester. You can also use \"shorthand types\" for the following\n * predefined types:\n *\n *     {\n *         atom: 'atom+xml',\n *         css: 'text/css',\n *         csv: 'text/csv',\n *         html: 'text/html',\n *         javascript: 'application/javascript',\n *         jcard: 'application/vcard+json',\n *         json: 'application/json',\n *         jsonld: 'application/ld+json',\n *         markdown: 'text/markdown',\n *         text: 'text/plain',\n *         vcard: 'text/vcard'\n *     };\n */\nnegotiator.prefers('text/html');  // > true\nnegotiator.prefers('html');       // > true\nnegotiator.prefers('text/plain'); // > false\n\n/**\n * Alternately you can read the `.preferred` property to obtain the requester's\n * most desired media type. It returns an instance of the `MediaType` class.\n */\nnegotiator.preferred; // > MediaType { type: 'text', subtype: 'html', parameters: { q: 1 }, specificity: 2 }\n\n/**\n * Also, if you would prefer the textual representation of the preferred media\n * type you can simpy call the `MediaType.prototype.toString()` method.\n */\nnegotiator.preferred; // > 'text/html'\n\n/**\n * The `.mediaRange` property contains a quality sorted array of the desired\n * media types.\n */\nnegotiator.mediaRange; // > ['text/html', 'text/x-c', 'text/x-dvi', 'text/plain']\n```\n\nTesting\n-------\n```sh\n$ npm test  # Or alternately: `yarn test`\n```\n\nReference\n---------\n- [Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content &sect; 5.3: Content Negotiation][RFC7231 SEC 5.3]\n\nLicense\n-------\nThe MIT License (Expat). See the [license file](LICENSE) for details.\n\n[BUILD BADGE]: https://img.shields.io/travis/becquerel-js/content-negotiator.svg?style=flat-square\n[BUILD PAGE]: https://travis-ci.org/becquerel-js/content-negotiator\n[LICENSE BADGE]: https://img.shields.io/badge/license-MIT%20License-blue.svg?style=flat-square\n[LICENSE PAGE]: https://github.com/becquerel-js/content-negotiator/blob/master/LICENSE\n[NODE PAGE]: https://nodejs.org/\n[NODE VERSION BADGE]: https://img.shields.io/badge/node-%3E%3D7.10-%23010101.svg\n[NPM PAGE]: https://www.npmjs.com/package/@becquerel/content-negotiator\n[NPM VERSION BADGE]: https://img.shields.io/npm/v/@becquerel/content-negotiator.svg?style=flat-square\n[RFC7231 SEC 5.3]: https://tools.ietf.org/html/rfc7231#section-5.3\n","maintainers":[{"name":"radioactivehamster","email":"james.benner@gmail.com"}],"time":{"modified":"2022-04-04T18:08:20.052Z","created":"2017-07-12T23:41:13.146Z","0.1.0-alpha.1":"2017-07-12T23:41:13.146Z","0.1.0-alpha.2":"2017-07-13T00:55:09.124Z","0.1.0-alpha.3":"2017-07-13T14:07:42.169Z"},"homepage":"https://github.com/becquerel-js/content-negotiator#readme","keywords":["content","negotiation","http"],"repository":{"type":"git","url":"git+https://github.com/becquerel-js/content-negotiator.git"},"author":{"name":"James Benner"},"bugs":{"url":"https://github.com/becquerel-js/content-negotiator/issues"},"license":"MIT","readmeFilename":"README.md"}