Socket
Book a DemoInstallSign in
Socket

acceptable

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acceptable

Content negotiation middleware for Express and Restify

0.1.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Acceptable

Build Status

Purpose

Error fast/early for 406 Not Acceptable requests

Installation

Via npm

npm install acceptable

Usage

Coffeescript

express = require 'express'
acceptable = require 'acceptable'

app = express()
app.use acceptable('json', 'txt', 'html', 'xml', 'js', 'jpg')

Javascript

var express = require('express');
var acceptable = require('acceptable');

var app = express();

app.use(acceptable('json', 'txt', 'html', 'xml', 'js', 'jpg'));

Test

npm install
npm test

Keywords

accept

FAQs

Package last updated on 17 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.