Skip to content

azanium/node-sanitizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-sanitizer

Node Object Sanitizer

Installation

Clone the repo and make it yours:

yarn add node-sanitizer

Use

const sanitizer = require('node-sanitizer');

const obj = {
  username: '[email protected]',
  password: 'veryverysecret',
  fullname: 'Awesome guy',
};

const sanitizedObject = sanitizer(obj, ['password']);

console.log(sanitizedObject);

License

MIT License - Suhendra Ahmad