Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.96 KB

appendToPath.md

File metadata and controls

47 lines (38 loc) · 1.96 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


appendToPath(path, key, [separator]) ⇒ string

Adds a key to the end of a path.

Param Type Default Description
path string The path.
key string, number The next key to append.
[separator] string "." Defines the boundary between steps in the path.

Example

import { appendToPath } from 'object-agent';

appendToPath('first.0', 'last');
// => 'first.0.last'