Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.88 KB

initialInPath.md

File metadata and controls

46 lines (37 loc) · 1.88 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


initialInPath(path, [separator]) ⇒ string

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'