jshttp / negotiator

An HTTP content negotiator for Node.js
MIT License
309 stars 33 forks source link

Added an option preferred encodings array #59

Closed danielgindi closed 1 week ago

danielgindi commented 3 years ago

Will be used in https://github.com/expressjs/compression/pull/172

danielgindi commented 3 years ago

@dougwilson Would you mind adding a minor change to accepts if/when this PR is merged? This will save some time. Then I'll revert the brotli branch to use accepts module with a simple extra argument.

nicksrandall commented 3 years ago

@dougwilson thanks for shepherding this along.

wesleytodd commented 1 week ago

After merging this I was looking at the api and realized we are limiting ourselves by passing an array directly, so I wrapped it in an options object so we have less of a chance of needing to break that api in future changes. That is what I will release with 1.0.