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

koa-methodoverride

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-methodoverride - npm Package Compare versions

Comparing version 0.4.2 to 1.0.0

13

index.js

@@ -16,8 +16,9 @@ /*!

*/
var debug = require('debug')('method-override')
var methods = require('methods');
var HTTP_METHOD_OVERRIDE_HEADER = "X-HTTP-Method-Override";
var ALLOWED_METHODS = ['POST'];
const debug = require('debug')('method-override')
const methods = require('methods')
const HTTP_METHOD_OVERRIDE_HEADER = "X-HTTP-Method-Override"
const ALLOWED_METHODS = ['POST']
/**

@@ -49,3 +50,3 @@ * Method Override:

// get the getter fn
var get = typeof getter === 'function'
const get = typeof getter === 'function'
? getter

@@ -55,3 +56,3 @@ : createGetter(getter || HTTP_METHOD_OVERRIDE_HEADER)

// get allowed request methods to examine
var methods = options.methods === undefined
const methods = options.methods === undefined
? ALLOWED_METHODS

@@ -58,0 +59,0 @@ : options.methods

{
"name": "koa-methodoverride",
"version": "0.4.2",
"version": "1.0.0",
"description": "HTTP method override for koa",
"author": "fundon <cfddream@gmail.com>",
"author": "Fangdun Cai <cfddream@gmail.com>",
"license": "MIT",

@@ -10,3 +10,5 @@ "repository": "koa-modules/methodoverride",

"scripts": {
"test": "NODE_ENV=test ./node_modules/.bin/mocha --harmony --reporter spec --require should"
"test": "mocha --harmony --reporter spec --bail --check-leaks",
"test-ci": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/*.js",
"test-cov": "node_modules/.bin/istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/*.js"
},

@@ -24,11 +26,12 @@ "keywords": [

"devDependencies": {
"istanbul": "*",
"koa": "*",
"mocha": "*",
"should": "*",
"supertest": "*"
},
"files": [
"LICENSE",
"license",
"readme.md",
"index.js"
]
}
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