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

methods

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

methods - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

5

HISTORY.md

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

1.1.2 / 2016-01-17
==================
* perf: enable strict mode
1.1.1 / 2014-12-30

@@ -2,0 +7,0 @@ ==================

39

index.js

@@ -0,14 +1,42 @@

/*!
* methods
* Copyright(c) 2013-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
* @private
*/
var http = require('http');
/* istanbul ignore next: implementation differs on version */
if (http.METHODS) {
/**
* Module exports.
* @public
*/
module.exports = http.METHODS.map(function(method){
module.exports = getCurrentNodeMethods() || getBasicNodeMethods();
/**
* Get the current Node.js methods.
* @private
*/
function getCurrentNodeMethods() {
return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) {
return method.toLowerCase();
});
}
} else {
/**
* Get the "basic" Node.js methods, a snapshot from Node.js 0.10.
* @private
*/
module.exports = [
function getBasicNodeMethods() {
return [
'get',

@@ -41,3 +69,2 @@ 'post',

];
}

12

package.json
{
"name": "methods",
"description": "HTTP methods that node supports",
"version": "1.1.1",
"version": "1.1.2",
"contributors": [

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

"devDependencies": {
"istanbul": "0.3",
"mocha": "1"
"istanbul": "0.4.1",
"mocha": "1.21.5"
},

@@ -26,5 +26,5 @@ "files": [

"scripts": {
"test": "mocha --reporter spec",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},

@@ -31,0 +31,0 @@ "browser": {

@@ -9,5 +9,13 @@ # Methods

HTTP verbs that node core's parser supports.
HTTP verbs that Node.js core's HTTP parser supports.
This module provides an export that is just like `http.METHODS` from Node.js core,
with the following differences:
* All method names are lower-cased.
* Contains a fallback list of methods for Node.js versions that do not have a
`http.METHODS` export (0.10 and lower).
* Provides the fallback list when using tools like `browserify` without pulling
in the `http` shim module.
## Install

@@ -27,3 +35,5 @@

This is an array of lower-case method names that Node.js supports.
This is an array of lower-cased method names that Node.js supports. If Node.js
provides the `http.METHODS` export, then this is the same array lower-cased,
otherwise it is a snapshot of the verbs from Node.js 0.10.

@@ -37,3 +47,3 @@ ## License

[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat
[node-version-url]: http://nodejs.org/download/
[node-version-url]: https://nodejs.org/en/download/
[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat

@@ -40,0 +50,0 @@ [travis-url]: https://travis-ci.org/jshttp/methods

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