lang

Methods

(static) toggle(object, path) → {Object}

Source:
Since:
  • 0.1.5
Applies ! to the property.
Example
toggle({ nested: { prop: true } }, 'nested.prop') // { nested: { prop: false } }
Parameters:
Name Type Description
object Object The object to modify.
path Array | string The path of the property to set.
Returns:
Returns the updated object.
Type
Object