Ninety-nine Pitchers of Malt
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hide-secrets

1.1.0 • Public • Published

hide-secrets

Build Status Coverage Status NPM version js-standard-style

var hide = require('hide-secrets')
 
var obj = {
  innerObject: {
    password: 'abc123',
    email: 'ben@npmjs.com',
    token: 'my-secret-token'
  },
  auth: '' // empty strings are left empty.
}
 
console.log(hide(obj))

outputs

{
  innerObject: {
    password: '[SECRET]',
    email: 'ben@npmjs.com',
    token: '[SECRET]'
  },
  auth: ''
}

Currently the following fields are obfuscated:

password, pass, token, auth, secret, passphrase.

License

ISC

install

npm i hide-secrets

Downloadsweekly downloads

908

version

1.1.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability