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

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

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
Details
npm
2026-02-24 13:54:18 +00:00
0
MIT
latest
3.0 KiB
Assets (1)
Versions (1) View all
2.0.18 2026-02-24