strict-accepts
v1.0.1
Published
Higher level content negotiation based on accepts with strict validate.
Downloads
10
Readme
stricct-accepts
Higher level content negotiation based on accepts with strict validate.
Example
var accepts = require('strict-accepts');
var req = {
headers: {
...
accept: 'text/html, */*; q=0.1'
}
}
console.log(accepts.typeOf(req, 'js'))
// -> false
console.log(accepts.typeOf(req, 'html'))
// -> true