Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

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,489,907
increased by1.3%

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,328,483 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. It has 3 open source maintainers collaborating on the project.

Last updated on 06 Jan 2020
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