Node Object Sanitizer
Clone the repo and make it yours:
yarn add node-sanitizer
const sanitizer = require('node-sanitizer');
const obj = {
username: '[email protected]',
password: 'veryverysecret',
fullname: 'Awesome guy',
};
const sanitizedObject = sanitizer(obj, ['password']);
console.log(sanitizedObject);