1.0.0 • Published 10 years ago

@micro-js/get-prop v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 years ago

get-prop

Build status Git tag NPM version Code style

Get nested property from object.

Installation

$ npm install @micro-js/get-prop

Usage

var getProp = require('@micro-js/get-prop')

var obj = {foo: {bar: 'baz'}}
getProp('foo.bar', obj) // => 'baz'

API

getProp(path, obj)

  • path - array or dot seperated string specifying path
  • obj - obj to retrieve property from

Returns: property

License

MIT

1.0.0

10 years ago

0.1.1

10 years ago