Hide-secrets

hide-secrets

hide certain restricted fields whiling logging objects.

This module obfuscated any of password, pass, token, auth, secret or passphrase attribute's value to '[SECRET]'. Very useful when logging an object that has sensitive data!

Install it: npm install --save hide-secrets

Sample usage:

var hide = require('hide-secrets') var obj = { innerObject: { password: 'abc123', email: '[email protected]', token: 'my-secret-token' }, auth: '' // empty strings are left empty. } hide(obj)

GIF FTW!

hide-secrets

Thanks to Benjamin Coe for helping us hide our secrets ;)

Suggest a module

Comments