A javascript library for working with objects
Returns the path without the last key.
Param | Type | Default | Description |
---|---|---|---|
path | string |
The path. | |
[separator] | string |
"." |
Defines the boundary between steps in the path. |
Example
import { initialInPath } from 'object-agent';
initialInPath('first.0.last');
// => 'first.0'