compressible (2.0.18)
Published 2026-02-24 13:54:18 +00:00 by atheaadmin
Installation
registry=npm install compressible@2.0.18"compressible": "2.0.18"About this package
compressible
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
Dependencies
Dependencies
| ID | Version |
|---|---|
| mime-db | >= 1.43.0 < 2 |
Development Dependencies
| ID | Version |
|---|---|
| eslint | 6.8.0 |
| eslint-config-standard | 14.1.0 |
| eslint-plugin-import | 2.19.1 |
| eslint-plugin-markdown | 1.0.1 |
| eslint-plugin-node | 11.0.0 |
| eslint-plugin-promise | 4.2.1 |
| eslint-plugin-standard | 4.0.1 |
| mocha | 7.0.0 |
| nyc | 15.0.0 |
Keywords
compress
gzip
mime
content-type