Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

compressible

Package Overview
Dependencies
1
Maintainers
3
Versions
26
Issues
File Explorer

Advanced tools

compressible

Compressible Content-Type / mime checking

    2.0.18latest

Version published
Maintainers
3
Weekly downloads
17,675,107
decreased by-12.64%

Weekly downloads

Readme

Source

compressible

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

Compressible Content-Type / mime checking.

Installation

$ npm install compressible

API

var compressible = require('compressible')

compressible(type)

Checks if the given Content-Type is compressible. The type argument is expected to be a value MIME type or Content-Type string, though no validation is performed.

The MIME is looked up in the mime-db and if there is compressible information in the database entry, that is returned. Otherwise, this module will fallback to true for the following types:

  • text/*
  • */*+json
  • */*+text
  • */*+xml

If this module is not sure if a type is specifically compressible or specifically uncompressible, undefined is returned.

compressible('text/html') // => true compressible('image/png') // => false

License

MIT

Keywords

FAQs

What is compressible?

Compressible Content-Type / mime checking

Is compressible popular?

The npm package compressible receives a total of 14,299,649 weekly downloads. As such, compressible popularity was classified as popular.

Is compressible well maintained?

We found that compressible demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 3 open source maintainers collaborating on the project.

Last updated on 06 Jan 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc