A javascript library for working with objects
Deletes a property from an object, if the property exists.
Param | Type |
---|---|
object | Object |
key | String |
Example
import { erase } from 'object-agent';
const foo = {
bar: 1,
also: 2
};
erase(foo, 'bar');
console.log(foo);
// => {also: 2}