@scuba-squad/acceptable
v2.0.7
Published
Content negotiation middleware for Express and Restify
Downloads
2
Maintainers
Readme
Acceptable
Purpose
Error fast/early for 406 Not Acceptable requests
Installation
Via npm
npm install @scuba-squad/acceptable
Usage
const express = require('express');
const acceptable = require('@scuba-squad/acceptable');
const app = express();
app.use(acceptable('json', 'txt', 'html', 'xml', 'js', 'jpg'));
Test
npm install
npm test