fast-redact
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -11,3 +11,2 @@ 'use strict' | ||
const paths = Object.keys(secret) | ||
.filter((path) => secret[path].precensored === false) | ||
const resetters = resetTmpl(secret, paths) | ||
@@ -14,0 +13,0 @@ const hasWildcards = wcLen > 0 |
{ | ||
"name": "fast-redact", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "very fast object redaction", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -292,2 +292,18 @@ 'use strict' | ||
test('redact.restore function places original values back in place when called twice and the first call is precensored', ({ end, is }) => { | ||
const censor = 'test' | ||
const redact = fastRedact({ paths: ['a'], censor, serialize: false }) | ||
const o1 = { a: censor } | ||
const o2 = { a: 'a' } | ||
redact(o1) | ||
is(o1.a, censor) | ||
redact.restore(o1) | ||
is(o1.a, censor) | ||
redact(o2) | ||
is(o2.a, censor) | ||
redact.restore(o2) | ||
is(o2.a, 'a') | ||
end() | ||
}) | ||
test('masks according to supplied censor function', ({ end, is }) => { | ||
@@ -294,0 +310,0 @@ const redact = fastRedact({ paths: ['a'], censor: censorFct, serialize: false }) |
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
72205
1626