1.0.1 • Published 6 years ago

obj-value v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

obj-value

Safely access javascript object values NpmVersion

Usage

First you need to install:

$ npm install obj-value

Then you can use it in your program:

const get = require('obj-value')

const obj = { a: { b: { c: 'd' } } }

get(obj, 'a.b.c') // returns 'd'
get(obj, 'a.b.d') // returns `null`

License

MIT