recursive-remove
v0.0.3
Published
Recursive remove
Downloads
4
Readme
Recursive remove
Usage
import {recursiveRemove} from 'recursive-remove';
const a = [
0,
-0,
BigInt(0),
"",
null,
undefined,
NaN,
false
]
recursiveRemove(
a,
{
removeOption: {
isFalsy: true,
},
},
);
console.log(a) // []
import {recursiveRemove} from 'recursive-remove';
const a = {
a: 0,
b: -0,
c: BigInt(0),
d: "",
e: null,
f: undefined,
g: NaN,
h: false,
}
recursiveRemove(
a,
{
removeOption: {
isFalsy: true,
},
},
);
console.log(a) // {}
Installation
npm install recursive-remove