1.0.2 • Published 8 years ago
fastget v1.0.2
Fastget
An alternative to lodash' _.get(). It can get the value from an object or an array with ease.
Install
npm install fastget --saveor with yarn
yarn add fastgetUsage
import get from 'fastget';
const obj = {a: [{b: {c: 3}}]}
get(() => obj.a[0].b.c)
// => 3
get(() => obj.a.b.c, 'default')
// => 'default'Tests
npm testor with yarn
yarn testLicence
MIT