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

type-is

Package Overview
Dependencies
Maintainers
6
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-is - npm Package Compare versions

Comparing version 1.6.3 to 1.6.4

8

HISTORY.md

@@ -0,1 +1,9 @@

1.6.4 / 2015-07-01
==================
* deps: mime-types@~2.1.2
- Add new mime types
* perf: enable strict mode
* perf: remove argument reassignment
1.6.3 / 2015-06-08

@@ -2,0 +10,0 @@ ==================

44

index.js

@@ -8,11 +8,23 @@ /*!

'use strict'
/**
* Module dependencies.
* @private
*/
var typer = require('media-typer')
var mime = require('mime-types')
module.exports = typeofrequest;
typeofrequest.is = typeis;
typeofrequest.hasBody = hasbody;
typeofrequest.normalize = normalize;
typeofrequest.match = mimeMatch;
/**
* Module exports.
* @public
*/
module.exports = typeofrequest
module.exports.is = typeis
module.exports.hasBody = hasbody
module.exports.normalize = normalize
module.exports.match = mimeMatch
/**

@@ -29,3 +41,3 @@ * Compare a `value` content-type with `types`.

* @param {Array} types
* @return String
* @public
*/

@@ -68,3 +80,3 @@

// no matches
return false;
return false
}

@@ -80,3 +92,3 @@

* @return {Boolean}
* @api public
* @public
*/

@@ -112,3 +124,3 @@

* @return {String|false|null}
* @api public
* @public
*/

@@ -135,3 +147,3 @@

return typeis(value, types);
return typeis(value, types)
}

@@ -152,3 +164,3 @@

* @param {String} type
* @api private
* @private
*/

@@ -159,7 +171,5 @@

case 'urlencoded':
type = 'application/x-www-form-urlencoded'
break
return 'application/x-www-form-urlencoded'
case 'multipart':
type = 'multipart/*'
break
return 'multipart/*'
}

@@ -169,3 +179,3 @@

// "+json" -> "*/*+json" expando
type = '*/*' + type
return '*/*' + type
}

@@ -186,3 +196,3 @@

* @return {Boolean}
* @api private
* @private
*/

@@ -189,0 +199,0 @@

{
"name": "type-is",
"description": "Infer the content-type of a request.",
"version": "1.6.3",
"version": "1.6.4",
"contributors": [

@@ -13,6 +13,6 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>",

"media-typer": "0.3.0",
"mime-types": "~2.1.1"
"mime-types": "~2.1.2"
},
"devDependencies": {
"istanbul": "0.3.14",
"istanbul": "0.3.17",
"mocha": "~1.21.5"

@@ -19,0 +19,0 @@ },

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