{"versions":{"1.0.0":{"name":"@fastify/accept-negotiator","version":"1.0.0","description":"a negotiator for the accept-headers","type":"commonjs","main":"index.js","types":"types/index.d.ts","scripts":{"test":"tsd && nyc node ./test/index.js","lint":"standard index.js test/* benchmarks/*"},"standard":{"ignore":["index.d.ts"]},"keywords":["encoding","negotiator","accept-encoding","accept","http","header"],"author":{"name":"Aras Abbasi"},"license":"MIT","devDependencies":{"benchmark":"2.1.4","nyc":"15.1.0","standard":"17.0.0","tsd":"^0.21.0"},"engines":{"node":">=14"},"repository":{"type":"git","url":"git+https://github.com/@fastify/encoding-negotiator.git"},"bugs":{"url":"https://github.com/fastify/encoding-negotiator/issues"},"gitHead":"276a8db1fc945b3c5f04ceec333a6bf997f9a8e9","homepage":"https://github.com/@fastify/encoding-negotiator#readme","_id":"@fastify/accept-negotiator@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-4R/N2KfYeld7A5LGkai+iUFMahXcxxYbDp+XS2B1yuL3cdmZLJ9TlCnNzT3q5xFTqsYm0GPpinLUwfSwjcVjyA==","shasum":"f0e73a3f8c6ba739d66a629b386c838889ec7a23","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/accept-negotiator/-/accept-negotiator-1.0.0.tgz","fileCount":5,"unpackedSize":7917,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpTqjXQW08PbfBkWtKN7k21tPPrDajIsvm7EtkMGDH8AiEAn7vPwydgoxYjH/p2sfRXOgmH/KUom4E4wc5jkDsdSHQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuNPFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7PxAAhHMOAlQD+bf4doh5vkMyCuuy1lCotDzybE31LGtrGDa7MIsQ\r\ny+PcMnr93ml5hufiwvsLjQXwyJZ/9Z4Laq7GW2GEtYcpJHXv+0COuEcsBxQD\r\nvLhzl7uKQr9sSzoy7JW6vNouceBfpUeDLfth/mFDQjOrZSdFGOmSEB9iBbeQ\r\ni+Kww/BtYQ5w+dxbyymU1QRKnsRizWHYHnEHa3qHQ8q2AeX/zFBTowZxyyCh\r\nns+aHRFLF1zUmZ2E3yXfWPYwfvbNKwPY6zSCn3Ix4ZhWHmUsuh20tq9q1tmW\r\nlPmOpXfNtE4W7CWh/Fkw56lWJGsMVHkmGEdOopwCzjz5sDTDJHgTwcPbNzEC\r\nAc5G0ThFZUyIwScc49Ruww2y8vldIqPaNJXAflY74IMJpZqosMbr3Q1j6IxT\r\nyhfIRIUerY3lQZ6qkqMKgCZqdfs8OPclwgJdc0qUbOwzZHqkLgu0e0++5pP4\r\nM7Frm/Cu3btU1VEBPa6sivbijSAPJ3+ADR8BwSr2J9moanLwJWcLSdFCAmcC\r\nNNNaTA26WUGrx8F3pEPw/KAF6HkRyFXuw+7aJ7ziOrnjym3Cxlg7Fkcj/7UE\r\nFMPAUWx2dcX+EuLnz4cxwU9tMbsCZRgt0faT0pP8SkLpArG1oj27s7Uu2AIe\r\nfz/b7CKFngY2JA9HVoCpbp6eLYH9Ywwh408=\r\n=U3QH\r\n-----END PGP SIGNATURE-----\r\n","size":2867},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"ethan@arrowood.dev"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/accept-negotiator_1.0.0_1656280005366_0.9247708481581653"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-26T21:46:49.353Z","contributors":[]},"1.1.0":{"name":"@fastify/accept-negotiator","version":"1.1.0","description":"a negotiator for the accept-headers","type":"commonjs","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard index.js test/* benchmarks/*","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"standard":{"ignore":["index.d.ts"]},"keywords":["encoding","negotiator","accept-encoding","accept","http","header"],"author":{"name":"Aras Abbasi"},"license":"MIT","devDependencies":{"benchmark":"2.1.4","standard":"17.0.0","tap":"^16.3.0","tsd":"^0.24.1"},"engines":{"node":">=14"},"repository":{"type":"git","url":"git+https://github.com/fastify/accept-negotiator.git"},"bugs":{"url":"https://github.com/fastify/accept-negotiator/issues"},"gitHead":"054b9cf7f06abf0b9c9c098b8b731758d823d167","homepage":"https://github.com/fastify/accept-negotiator#readme","_id":"@fastify/accept-negotiator@1.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==","shasum":"c1c66b3b771c09742a54dd5bc87c582f6b0630ff","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/accept-negotiator/-/accept-negotiator-1.1.0.tgz","fileCount":5,"unpackedSize":8197,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC00LkT63CSUN0icImjSDYIEkgsniAdnYnpyzsvcEBdCAIgDWFXwTOl1NVQkmGcABFBN4sNOgTcagebpIKDVfjc8Zs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjNLKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8jRAAlr4AQ2LXhdzb0jTZRX7tRBFR/7JyH1g6ENyQ2qIHDWTu87Tt\r\nTWWaeQ5gQQI4tNrbfvifCGDzgM0RooJGdGDtl9S2Z+23WIWP6lwE/3982FKe\r\npxlgvF3aqBu/KstGGgN7TiFsR42MFqBkxNyEr8Xb4qbxnsPPFkzuh0AZ3AxK\r\nP2Ekp+y53GY4RIomv+/a84YUuZMNYx0CA5cGZ4SPS8NY1XupJ3F6LEiCEago\r\nNqMR3sYfuNkt0yeLxeQRLDHcWt2l+gfjsAi6HCfavyDiAssLKU/FIoDkmR/w\r\nLfQITmiI/d0NwIAnISozggOigHTyWWAzUmLQPtDAZxr68knaRXAGLT/MVJrb\r\nR1QvOwbRcYS6C5jE4lAnAjh5dxHGQUlxI61Z6DlrEISaXnF94htxGxjuDdLw\r\nnPnXvRy14N0uB08czzynGEokiFWB6RnMMuB8V6OcI/VPPgrd+zL9SKAqJLlu\r\nwLM4fMdul664KtNzU6XotaFmnScIxNU51skl5QSdVDSCL6msUtoo5hDQxe1u\r\nm6fJjGPU7DlmV8YoJR65tKgDL0Sc/X73mVCkFhnSJ34J1grhkcUi/mATQmhN\r\nnM4JxwphNLiTkMuNKZE8TK/5XbkGCF1INRgX8ykdz8m9UE6HtjWHCkyAjye0\r\n/oT6ExWKPY92XNjyp5AstnNbstbKiJn3AsE=\r\n=JoQT\r\n-----END PGP SIGNATURE-----\r\n","size":2944},"_npmUser":{"name":"anonymous","email":"behemoth89@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/accept-negotiator_1.1.0_1670173386594_0.48004494268184605"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-04T17:03:21.595Z","contributors":[]},"2.0.0-pre.fv5.1":{"name":"@fastify/accept-negotiator","version":"2.0.0-pre.fv5.1","description":"a negotiator for the accept-headers","type":"commonjs","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard index.js test/* benchmarks/*","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"standard":{"ignore":["index.d.ts"]},"keywords":["encoding","negotiator","accept-encoding","accept","http","header"],"author":{"name":"Aras Abbasi"},"license":"MIT","devDependencies":{"@fastify/pre-commit":"^2.1.0","benchmark":"2.1.4","standard":"17.1.0","tap":"^18.7.2","tsd":"^0.31.0"},"repository":{"type":"git","url":"git+https://github.com/fastify/accept-negotiator.git"},"bugs":{"url":"https://github.com/fastify/accept-negotiator/issues"},"_id":"@fastify/accept-negotiator@2.0.0-pre.fv5.1","readmeFilename":"README.md","gitHead":"3347ba4440b5b25324193b9409085d088cdc4855","homepage":"https://github.com/fastify/accept-negotiator#readme","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-HVj9ELGUv71QuOFiYWxBUrKL+HhN+MwiZtl7kEOrV5hJc/rh/cjP5eQp9udtwPaV1iutNSLg40dJLtzQKFVxLA==","shasum":"56bdcbdd22f214ae68e2ce8b9300a6d438fb1090","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/accept-negotiator/-/accept-negotiator-2.0.0-pre.fv5.1.tgz","fileCount":5,"unpackedSize":8205,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAT5kYfsZKnTUOhfD0MptDSLDtZE8mVRcHW4pJq6/1kzAiBUwGM7iq0HyQ0oUo9eF9NOLL0Fcw971RcZrTBJ0owciQ=="}],"size":2967},"_npmUser":{"name":"anonymous","email":"james.sumners@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hey@gurgun.day"},{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/accept-negotiator_2.0.0-pre.fv5.1_1720175586121_0.1816654635635342"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-05T10:33:06.288Z","publish_time":1720175586288,"_source_registry_name":"default","contributors":[]},"2.0.0":{"name":"@fastify/accept-negotiator","version":"2.0.0","description":"a negotiator for the accept-headers","type":"commonjs","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard index.js test/* benchmarks/*","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"standard":{"ignore":["index.d.ts"]},"keywords":["encoding","negotiator","accept-encoding","accept","http","header"],"author":{"name":"Aras Abbasi"},"license":"MIT","devDependencies":{"@fastify/pre-commit":"^2.1.0","benchmark":"2.1.4","standard":"17.1.0","tap":"^18.7.2","tsd":"^0.31.0"},"repository":{"type":"git","url":"git+https://github.com/fastify/accept-negotiator.git"},"bugs":{"url":"https://github.com/fastify/accept-negotiator/issues"},"_id":"@fastify/accept-negotiator@2.0.0","readmeFilename":"README.md","gitHead":"3ecf1d0ebe7b309b6d8952620c7526b254b8a09e","homepage":"https://github.com/fastify/accept-negotiator#readme","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-/Sce/kBzuTxIq5tJh85nVNOq9wKD8s+viIgX0fFMDBdw95gnpf53qmF1oBgJym3cPFliWUuSloVg/1w/rH0FcQ==","shasum":"efce76b4d658e7ee669e681c2d79bffc9a654fdb","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/accept-negotiator/-/accept-negotiator-2.0.0.tgz","fileCount":5,"unpackedSize":8195,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYrS+794KNiT3LZVEoSTQTSxLNRWETGDUYrtXGKek3YAiBciaQjjrRWkA5blcF6YHg1AeHK6nNYU5esvvMQ+5Vtfw=="}],"size":2958},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hey@gurgun.day"},{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/accept-negotiator_2.0.0_1725369759138_0.9321817920431748"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-03T13:22:39.329Z","publish_time":1725369759329,"_source_registry_name":"default","contributors":[]},"2.0.1":{"name":"@fastify/accept-negotiator","version":"2.0.1","description":"a negotiator for the accept-headers","type":"commonjs","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"eslint","lint:fix":"eslint --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"c8 --100 node --test","test:typescript":"tsd"},"keywords":["encoding","negotiator","accept-encoding","accept","http","header"],"author":{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"James Sumners","url":"https://james.sumners.info"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"MIT","devDependencies":{"@fastify/pre-commit":"^2.1.0","@matteo.collina/tspl":"^0.1.1","benchmark":"2.1.4","c8":"^10.1.2","eslint":"^9.17.0","neostandard":"^0.12.0","tsd":"^0.31.0"},"repository":{"type":"git","url":"git+https://github.com/fastify/accept-negotiator.git"},"bugs":{"url":"https://github.com/fastify/accept-negotiator/issues"},"homepage":"https://github.com/fastify/accept-negotiator#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"_id":"@fastify/accept-negotiator@2.0.1","gitHead":"06b949d26896b6b0527beb4457c03519f1d0a293","_nodeVersion":"22.12.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-/c/TW2bO/v9JeEgoD/g1G5GxGeCF1Hafdf79WPmUlgYiBXummY0oX3VVq4yFkKKVBKDNlaDUYoab7g38RpPqCQ==","shasum":"77afd6254ba77f6c22c6f35c4fb0c1b6d005199b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/accept-negotiator/-/accept-negotiator-2.0.1.tgz","fileCount":5,"unpackedSize":9029,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdFwe/r1owy84oaKm2Du3kHPqmYDrR6bkfi9PrNnPrFAiBGWlS3zENhVnqpY6Rcdhd4U9P0QJqxbg+F3hUn2QbtnA=="}],"size":3259},"_npmUser":{"name":"anonymous","email":"kaka@kakawebsitedemo.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"hey@gurgun.day"},{"name":"anonymous","email":"me@metcoder.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/accept-negotiator_2.0.1_1735813700412_0.7095768916032021"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-02T10:28:20.620Z","publish_time":1735813700620,"_source_registry_name":"default"}},"dist-tags":{"latest":"2.0.1","next":"2.0.0"},"name":"@fastify/accept-negotiator","time":{"created":"2022-06-26T21:46:50.286Z","modified":"2026-03-05T20:02:00.157Z","1.0.0":"2022-06-26T21:46:45.492Z","1.1.0":"2022-12-04T17:03:06.763Z","2.0.0-pre.fv5.1":"2024-07-05T10:33:06.288Z","2.0.0":"2024-09-03T13:22:39.329Z","2.0.1":"2025-01-02T10:28:20.620Z"},"readme":"# @fastify/accept-negotiator\n\n\n[![CI](https://github.com/fastify/accept-negotiator/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/accept-negotiator/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/@fastify/accept-negotiator.svg?style=flat)](https://www.npmjs.com/package/@fastify/accept-negotiator)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nA negotiator for accept-* headers.\n\n### Install\n```\nnpm i @fastify/accept-negotiator\n```\n\n### Usage\n\nThe module exports a function that you can use for negotiating an accept-* header such as [`accept-encoding`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding). It takes 2 parameters:\n\n```\nnegotiate(header, supportedValues)\n```\n\n- `header` (`string`, required) - The accept-header, e.g. accept-encoding\n- `supportedValues` (`string[]`, required) - The values, which are supported\n\n```js\nconst negotiate = require('@fastify/accept-negotiator').negotiate\nconst encoding = negotiate('gzip, deflate, br', ['br'])\nconsole.log(encoding) // 'br*\n```\n\nThe module also exports a class that you can use for negotiating an accept-* header, and use caching for better performance.\n\n\n```\nNegotiate(supportedValues)\n```\n\n- `supportedValues` (`string[]`, required) - The values, which are supported\n- `cache` (`{ set: Function; get: Function; has: Function }`, optional) - A Cache-Store, e.g. ES6-Map or mnemonist LRUCache\n\n```js\nconst Negotiator = require('@fastify/accept-negotiator').Negotiator\nconst encodingNegotiator = new Negotiator({ supportedValues: ['br'], cache: new Map() })\n\nconst encoding = encodingNegotiator.negotiate('gzip, deflate, br')\nconsole.log(encoding) // 'br*\n```\n\n## License\n\nLicensed under [MIT](./LICENSE).","users":{}}