Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

accepts

Package Overview
Dependencies
Maintainers
7
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accepts - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

History.md

18

index.js

@@ -29,23 +29,23 @@ var Negotiator = require('negotiator')

* // Accept: text/html
* this.accepts('html');
* this.types('html');
* // => "html"
*
* // Accept: text/*, application/json
* this.accepts('html');
* this.types('html');
* // => "html"
* this.accepts('text/html');
* this.types('text/html');
* // => "text/html"
* this.accepts('json', 'text');
* this.types('json', 'text');
* // => "json"
* this.accepts('application/json');
* this.types('application/json');
* // => "application/json"
*
* // Accept: text/*, application/json
* this.accepts('image/png');
* this.accepts('png');
* this.types('image/png');
* this.types('png');
* // => undefined
*
* // Accept: text/*;q=.5, application/json
* this.accepts(['html', 'json']);
* this.accepts('html', 'json');
* this.types(['html', 'json']);
* this.types('html', 'json');
* // => "json"

@@ -52,0 +52,0 @@ *

{
"name": "accepts",
"description": "Higher-level content negotiation",
"version": "1.0.1",
"version": "1.0.2",
"author": {

@@ -22,3 +22,3 @@ "name": "Jonathan Ong",

"mime": "~1.2.11",
"negotiator": "~0.4.0"
"negotiator": "0.4.5"
},

@@ -29,5 +29,9 @@ "devDependencies": {

},
"engines": {
"node": ">= 0.8.0"
},
"scripts": {
"test": "make test"
"test": "mocha --require should --reporter dot",
"test-travis": "mocha --require should --reporter spec"
}
}

@@ -1,3 +0,6 @@

# Accepts [![Build Status](https://travis-ci.org/expressjs/accepts.png)](https://travis-ci.org/expressjs/accepts)
# Accepts
[![NPM version](https://badge.fury.io/js/accepts.svg)](http://badge.fury.io/js/accepts)
[![Build Status](https://travis-ci.org/expressjs/accepts.svg?branch=master)](https://travis-ci.org/expressjs/accepts)
Higher level content negotation based on [negotiator](https://github.com/federomero/negotiator). Extracted from [koa](https://github.com/koajs/koa) for general use.

@@ -4,0 +7,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc