object-path-value
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Build Status

Install

npm install object-path-value
yarn add object-path-value

Usage

let getValue = require('object-path-value');
 
console.log(getValue([1, 2, 3], 1) === 2);
console.log(getValue({ foo: { bar: 'hello world' } }, 'foo.bar') === 'hello world');
console.log(getValue({ foo: { bar: [1, 2, 3] } }, 'foo.bar.0') === 1);

Readme

Keywords

none

Package Sidebar

Install

npm i object-path-value

Weekly Downloads

31

Version

2.0.0

License

ISC

Unpacked Size

3.27 kB

Total Files

4

Last publish

Collaborators

  • max107