compressible

WebJar for compressible

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

compressible
Last Version

Last Version

2.0.18
Release Date

Release Date

Type

Type

jar
Description

Description

compressible
WebJar for compressible
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/jshttp/compressible

Download compressible

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/compressible/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>compressible</artifactId>
    <version>2.0.18</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/compressible/
implementation 'org.webjars.npm:compressible:2.0.18'
// https://jarcasting.com/artifacts/org.webjars.npm/compressible/
implementation ("org.webjars.npm:compressible:2.0.18")
'org.webjars.npm:compressible:jar:2.0.18'
<dependency org="org.webjars.npm" name="compressible" rev="2.0.18">
  <artifact name="compressible" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='compressible', version='2.0.18')
)
libraryDependencies += "org.webjars.npm" % "compressible" % "2.0.18"
[org.webjars.npm/compressible "2.0.18"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : mime-db jar [1.43.0,2)

Project Modules

There are no modules declared in this project.

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

org.webjars.npm
Low-Level JavaScript HTTP-related Modules

Versions

Version
2.0.18
2.0.16
2.0.14
2.0.13
2.0.8