0.2.4 • Published 8 years ago

lodash-getpath v0.2.4

Weekly downloads
775
License
MIT
Repository
github
Last release
8 years ago

Travis

lodash-getpath

A lodash plugin/extension/mixin for _.get, which allows intuitive paths eg. 'name0,1' and 'a.b[].x-1.z'

What for?

Above-and-beyond pathing syntax for nested-Array properties:

  • +/-ve index --> returns value from start/end of Array
  • [0,1,-2] list of indexes --> returns a (spliced) Array
  • [] all indexes --> returns a (whole) Array

Install

npm install --save lodash-getpath

Usage

Also available in the browser as simply _getPath() in the global context/window

Currently built using lodash ^4.0.0