fast-redact
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -42,3 +42,3 @@ 'use strict' | ||
: `o${delim}${path} = secret[${escPath}].val` | ||
const clear = `secret[${escPath}].val = null` | ||
const clear = `secret[${escPath}].val = undefined` | ||
return ` | ||
@@ -45,0 +45,0 @@ if (secret[${escPath}].val !== undefined) { |
{ | ||
"name": "fast-redact", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "very fast object redaction", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -883,1 +883,15 @@ 'use strict' | ||
}) | ||
test('handles objects with and then without target paths', ({ end, is }) => { | ||
const redact = fastRedact({ paths: ['test'] }) | ||
const o1 = { test: 'check' } | ||
const o2 = {} | ||
is(redact(o1), '{"test":"[REDACTED]"}') | ||
is(redact(o2), '{}') | ||
// run each check twice to ensure no mutations | ||
is(redact(o1), '{"test":"[REDACTED]"}') | ||
is(redact(o2), '{}') | ||
is('test' in o1, true) | ||
is('test' in o2, false) | ||
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
61801
1369