delete-property-by-values
v1.0.13
Published
delete properties in an object by choosen input values
Downloads
9
Maintainers
Readme
Delete property by values
Usage
# using require
const { deletePropertiesByValues } = require('delete-property-by-values');
# using import
import { deletePropertiesByValues } from 'delete-property-by-values';
Example
const boris = { name: 'Boris', firstname: null, wife: 'Selena', kids: [], nickName: '' };
const newBoris = deletePropertiesByValues(boris, [null, [], '']);
console.log(newBoris);// { name: 'Boris', wife: 'Selena' }