remove

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.object

Delete an object/array property by passing a dotpath to the element you want to remove.

Params

  1. obj*-Object

    The object in which to set the value

  2. dotpath*-String|String[]

    The dotted object/array path to delete

Example

import { remove } from '@blackbyte/sugar/object';
remove(myObject, 'my.cool.value');
remove(myObject, 'my.cool.value.0');

Todo

  • testsnormal