fast-redact
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -12,3 +12,3 @@ 'use strict' | ||
var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, '')) | ||
const leadingBracket = ix === 0 && strPath[0] === '[' | ||
const leadingBracket = strPath[0] === '[' | ||
path = path.map((p) => { | ||
@@ -15,0 +15,0 @@ if (p[0] === '[') return p.substr(1, p.length - 2) |
{ | ||
"name": "fast-redact", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "very fast object redaction", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -868,3 +868,3 @@ 'use strict' | ||
test('correctly restores original object when a matchin path has value of `undefined`', ({ end, is }) => { | ||
test('correctly restores original object when a matching path has value of `undefined`', ({ end, is }) => { | ||
const redact = fastRedact({ paths: ['foo.bar'], strict: false }) | ||
@@ -877,1 +877,8 @@ const o = { bar: undefined } | ||
}) | ||
test('handles multiple paths with leading brackets', ({ end, is }) => { | ||
const redact = fastRedact({ paths: ['["x-y"]', '["y-x"]'] }) | ||
const o = { 'x-y': 'test', 'y-x': 'test2' } | ||
is(redact(o), '{"x-y":"[REDACTED]","y-x":"[REDACTED]"}') | ||
end() | ||
}) |
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
61380
19
1356