Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

encoding-negotiator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

encoding-negotiator

a negotiator for the accept-encoding header

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
64K
decreased by-16.99%
Maintainers
1
Weekly downloads
 
Created
Source

encoding-negotiator

Install

Greenkeeper badge Build Status Coverage Status NPM version

npm install encoding-negotiator

Example

const encodingNegotiator = require('encoding-negotiator');

encodingNegotiator.negotiate('compress;q=0.5, gzip;q=1.0', ['gzip', 'deflate']); //returns gzip

API

negotiate(header, supported)

Returns the most preffered encoding available in supported The first element of the supported array will be used in case of an asterisk.

header

The accept-encoding header.

supported

An array of the supported encodings.

License

MIT

Keywords

FAQs

Package last updated on 09 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc