Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci-badge and usage in Readme.md #2

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @fastify/accept-negotiator


![CI](https://github.com/fastify/fastify-accept-negotiator/workflows/CI/badge.svg)
![CI](https://github.com/fastify/accept-negotiator/workflows/CI/badge.svg)
[![NPM version](https://img.shields.io/npm/v/@fastify/accept-negotiator.svg?style=flat)](https://www.npmjs.com/package/@fastify/accept-negotiator)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

Expand All @@ -24,7 +24,7 @@ negotiate(header, supportedValues)
- `supportedValues` (`string[]`, required) - The values, which are supported

```js
const negotiate = require('@fastify/accept-encoding').negotiate
const negotiate = require('@fastify/accept-negotiator').negotiate
const encoding = negotiate('gzip, deflate, br', ['br'])
console.log(encoding) // 'br*
```
Expand All @@ -40,7 +40,7 @@ Negotiate(supportedValues)
- `cache` (`{ set: Function; get: Function; has: Function }`, optional) - A Cache-Store, e.g. ES6-Map or mnemonist LRUCache

```js
const Negotiator = require('@fastify/accept-encoding').Negotiator
const Negotiator = require('@fastify/accept-negotiator').Negotiator
const encodingNegotiator = new Negotiator({ supportedValues: ['br'], cache: new Map() })

const encoding = encodingNegotiator.negotiate('gzip, deflate, br')
Expand All @@ -49,4 +49,4 @@ console.log(encoding) // 'br*

## License

Licensed under [MIT](./LICENSE).
Licensed under [MIT](./LICENSE).