koa-lowercase
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -1,5 +0,5 @@ | ||
'use strict' | ||
/* eslint-disable fp/no-mutating-methods */ | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
value: true, | ||
}) | ||
@@ -10,3 +10,6 @@ | ||
const op = `${origin}${path}` | ||
if (/[A-Z]/.test(op) && !['POST', 'HEAD', 'PUT', 'DELETE'].includes(ctx.method)) { | ||
if ( | ||
/[A-Z]/.test(op) && | ||
!['POST', 'HEAD', 'PUT', 'DELETE'].includes(ctx.method) | ||
) { | ||
const ld = `${op.toLowerCase()}${querystring ? '?' + querystring : ''}` | ||
@@ -13,0 +16,0 @@ ctx.status = 301 |
{ | ||
"name": "koa-lowercase", | ||
"description": "Simple lowercasing middleware for Koa 2.", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"author": { | ||
@@ -10,6 +10,12 @@ "email": "zac@zacanger.com", | ||
}, | ||
"funding": { | ||
"type": "ko-fi", | ||
"url": "https://ko-fi.com/zacanger" | ||
}, | ||
"license": "LGPL-3.0", | ||
"main": "koa-lowercase.js", | ||
"scripts": { | ||
"preversion": "sortpack && standard" | ||
"preversion": "npm t", | ||
"test": "npm run test:lint", | ||
"test:lint": "eslint -c .eslintrc.json *.js" | ||
}, | ||
@@ -31,4 +37,8 @@ "homepage": "https://github.com/zacanger/koa-lowercase#readme", | ||
"devDependencies": { | ||
"sortpack": "2.0.1", | ||
"standard": "14.3.1" | ||
"eslint": "6.8.0", | ||
"eslint-plugin-zacanger": "1.1.3", | ||
"husky": "4.2.3", | ||
"lint-staged": "10.0.9", | ||
"prettier": "2.0.2", | ||
"sortpack": "2.1.3" | ||
}, | ||
@@ -39,6 +49,15 @@ "engines": { | ||
"typings": "koa-lowercase.d.ts", | ||
"funding": { | ||
"type": "ko-fi", | ||
"url": "https://ko-fi.com/zacanger" | ||
"lint-staged": { | ||
"*.js": [ | ||
"prettier --write" | ||
], | ||
"package.json": [ | ||
"sortpack" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
} |
14097
14
42
6