1.0.1 • Published 7 years ago
strict-accepts v1.0.1
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