Skip to content

1.1.0

Compare
Choose a tag to compare
@fixe fixe released this 12 Aug 17:35
· 64 commits to master since this release

anonymizer

Object redaction with whitelist as main feature.

Arguments

  1. whitelist (Object): The whitelist object.

Example

const anonymizer = require('@uphold/anonymizer');
const anonymize = anonymizer(['foo.key', 'bar.*']);

anonymize({ foo: { key: 'public', another: 'bar' }, bar: { foo: 1, bar: 2 } });

//=> { foo: { key: 'public', another: '--REDACTED--' }, bar: { foo: 1, bar: 2 } }