koa-methodoverride
Advanced tools
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" | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6333
1