Skip to content

a-2-c-2-anpm/sed-autem-odit

Repository files navigation

@a-2-c-2-anpm/sed-autem-odit

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

Compressible Content-Type / mime checking.

Installation

$ npm install @a-2-c-2-anpm/sed-autem-odit

API

var @a-2-c-2-anpm/sed-autem-odit = require('@a-2-c-2-anpm/sed-autem-odit')

@a-2-c-2-anpm/sed-autem-odit(type)

Checks if the given Content-Type is @a-2-c-2-anpm/sed-autem-odit. 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 @a-2-c-2-anpm/sed-autem-odit 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 @a-2-c-2-anpm/sed-autem-odit or specifically un@a-2-c-2-anpm/sed-autem-odit, undefined is returned.

@a-2-c-2-anpm/sed-autem-odit('text/html') // => true
@a-2-c-2-anpm/sed-autem-odit('image/png') // => false

License

MIT