@aegenet/belt-hide-sensitive
v2.3.0
Published
Hide Sensititve data from string
Downloads
105
Readme
@aegenet/belt-hide-sensitive
Hide Sensititve data from string
💾 Installation
yarn add @aegenet/belt-hide-sensitive@^2.0.0
# or
npm i @aegenet/belt-hide-sensitive@^2.0.0
📝 Usage
Example, small cli to hide passwords/secrets from environment variables in the console output.
// ./hide-out-cli.js
import { createHideSensitiveFunction } from '@aegenet/belt-hide-sensitive';
const hideFunction = createHideSensitiveFunction(process.env);
process.stdin.on('data', data => process.stdout.write(hideFunction(data.toString())));
Usage: ./somethingWithSensitive.sh 2>&1 /dev/null | node ./hide-out-cli