JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 202692
  • Score
    100M100P100Q158408F
  • License MIT

Access nested property values at any depth with a simple expression.

Package Exports

  • object-get

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (object-get) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads Build Status Dependency Status js-standard-style

object-get

Access nested property values at any depth with a simple expression.

Example

var objectGet = require('object-get')

objectGet(object, expression) ⇒ *

Returns the value at the given property.

Kind: Exported function

Param Type Description
object object the input object
expression string the property accessor expression

Example

> objectGet({ animal: 'cow' }, 'animal')
'cow'

> objectGet({ animal: { mood: 'lazy' } }, 'animal')
{ mood: 'lazy' }

> objectGet({ animal: { mood: 'lazy' } }, 'animal.mood')
'lazy'

© 2015-16 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.