sanitize-values
v1.0.3
Published
Sanitize the values of sensitive properties in an object
Downloads
132
Readme
sanitize-values
Sanitize sensitive properties of an object.
npm i sanitize-values
Usage
var sanitizeObject = require('sanitize-values')
var data = {
firstName: 'Bob',
lastName: 'Bobbins',
ssn: '666-22-2432'
}
sanitizeObject(data, ['ssn'])
/*
{
firstName: 'Bob',
lastName: 'Bobbins',
ssn: '[FILTERED]'
}
*/
Contributing
After cloning this repository:
npm i
# run the tests
npm t