0.0.4 • Published 2 years ago
delete-object-property v0.0.4
🗑️ Delete Object Property
Small utility to remove a property from a complex object using strings. Several other packages already exist for this purpose, but I wanted my own :)
⬇️ Installation
npm i delete-object-property
📋 Usage
Works with both objects and arrays.
const object = {
foo: 'bar',
bar: {
baz: 'lorem ipsum',
},
};
const result = deleteProperties(object, 'bar.baz');
// This will output { foo: 'bar' }
console.log(result);
🔭 Plans
Not much yet