parse-request
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -115,3 +115,3 @@ "use strict"; | ||
function isUndefined(val) { | ||
return typeof val === 'undefined'; | ||
return val === undefined; | ||
} | ||
@@ -127,3 +127,3 @@ function isObject(val) { | ||
function isCreditCard(val) { | ||
const digits = val.replace(/\D/g, ''); | ||
const digits = val.replaceAll(/\D/g, ''); | ||
const types = creditCardType(digits); | ||
@@ -190,3 +190,3 @@ if (!Array.isArray(types) || types.length === 0) return false; | ||
// if it was a credit card then replace all digits with asterisk | ||
if (options.maskCreditCards && isCreditCard(val)) return val.replace(/[^\D\s]/g, '*'); | ||
if (options.maskCreditCards && isCreditCard(val)) return val.replaceAll(/[^\D\s]/g, '*'); | ||
} | ||
@@ -197,4 +197,4 @@ if (notIncludedInProps) return val; | ||
// Authorization: <type> <credentials> | ||
if (options.isHeaders && key === 'authorization') return `${val.split(' ')[0]} ${val.slice(val.indexOf(' ') + 1).replace(/./g, '*')}`; | ||
return val.replace(/./g, '*'); | ||
if (options.isHeaders && key === 'authorization') return `${val.split(' ')[0]} ${val.slice(val.indexOf(' ') + 1).replaceAll(/./g, '*')}`; | ||
return val.replaceAll(/./g, '*'); | ||
} | ||
@@ -201,0 +201,0 @@ function headersToLowerCase(headers) { |
{ | ||
"name": "parse-request", | ||
"description": "Parse requests in the Browser and Node (with added support for multer and passport). Made for Cabin.", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -32,3 +32,3 @@ "ava": { | ||
"http-headers": "^3.0.2", | ||
"is-array-buffer": "^3.0.1", | ||
"is-array-buffer": "^3.0.2", | ||
"is-buffer": "^2.0.5", | ||
@@ -39,25 +39,25 @@ "is-stream": "2.0.1", | ||
"no-case": "2.3.2", | ||
"qs": "^6.11.0", | ||
"qs": "^6.11.2", | ||
"rfdc": "^1.3.0", | ||
"sensitive-fields": "^1.0.0", | ||
"sensitive-fields": "^1.0.1", | ||
"url-parse": "^1.5.10" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.20.7", | ||
"@babel/core": "^7.20.12", | ||
"@babel/preset-env": "^7.20.2", | ||
"@commitlint/cli": "^17.4.2", | ||
"@commitlint/config-conventional": "^17.4.2", | ||
"@babel/cli": "^7.22.15", | ||
"@babel/core": "^7.22.17", | ||
"@babel/preset-env": "^7.22.15", | ||
"@commitlint/cli": "^17.7.1", | ||
"@commitlint/config-conventional": "^17.7.0", | ||
"@koa/multer": "^3.0.2", | ||
"@koa/router": "^12.0.0", | ||
"@ladjs/multer": "2.0.0-rc.5", | ||
"ava": "5.1.0", | ||
"axe": "^11.2.1", | ||
"ava": "5.3.1", | ||
"axe": "^12.2.2", | ||
"babelify": "^10.0.0", | ||
"browserify": "^17.0.0", | ||
"cabin": "^11.1.5", | ||
"cabin": "^13.2.4", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.31.0", | ||
"eslint": "^8.49.0", | ||
"eslint-config-xo-lass": "^2.0.1", | ||
"eslint-plugin-compat": "^4.0.2", | ||
"eslint-plugin-compat": "^4.2.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
@@ -70,5 +70,6 @@ "express": "^4.18.2", | ||
"jsdom": "15.2.1", | ||
"koa": "^2.14.1", | ||
"koa": "^2.14.2", | ||
"koa-connect": "^2.1.0", | ||
"lint-staged": "^13.1.0", | ||
"lint-staged": "^14.0.1", | ||
"multer": "1.4.5-lts.1", | ||
"nyc": "^15.1.0", | ||
@@ -79,7 +80,7 @@ "remark-cli": "^11.0.0", | ||
"response-time": "^2.3.2", | ||
"rimraf": "^4.0.4", | ||
"rimraf": "^5.0.1", | ||
"signale": "^1.4.0", | ||
"supertest": "^6.3.3", | ||
"tinyify": "3.0.0", | ||
"xo": "^0.53.1" | ||
"xo": "^0.56.0" | ||
}, | ||
@@ -86,0 +87,0 @@ "engines": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
516429
10287
38
Updatedis-array-buffer@^3.0.2
Updatedqs@^6.11.2
Updatedsensitive-fields@^1.0.1