Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 265 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 265 Bytes

getprop

Property getter for objects which supports nesting i.e. x.y.z

Install

npm install getprop

Usage

var get = require('getprop')

var bob = {
  name: 'bob',
  friend: {
    name: 'james'
  }
}
get(bob, 'friend.name') // => 'james'