1.0.2 • Published 7 years ago
sample-joelengt v1.0.2
accepts
Higher level content negotiation based on negotiator. Extracted from koa for general use.
In addition to negotiator, it allows:
- Allows types as an array or arguments list, ie
(['text/html', 'application/json'])
as well as('text/html', 'application/json')
. - Allows type shorthands such as
json
. - Returns
false
when no types match - Treats non-existent headers as
*
Installation
npm install sample-joelengt
API
var fruits = require('sample-joelengt');
console.log(fruits);