Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.85 KB

lastInPath.md

File metadata and controls

46 lines (37 loc) · 1.85 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


lastInPath(path, [separator]) ⇒ string

Returns the last key in a path.

Param Type Default Description
path string The path.
[separator] string "." Defines the boundary between steps in the path.

Example

import { lastInPath } from 'object-agent';

lastInPath('first.0.last');
// => 'last'