a.b

Lodash/Underscore mixin supporting deep object property access using dot notation


Keywords
dot, notation, lodash, underscore, mixin
License
MIT
Install
npm install a.b@2.0.0

Documentation

a.b

NPM version Build status

Install

$ npm install a.b --save

Usage

var _ = require('lodash');
_.mixin(require('a.b'));

var obj = {
  foo: {
    bar: {
      x: {
        3.14
      }
    }
  }
};

var x = _(obj).dot('foo.bar.x');  // x = 3.14
var y = _(obj).dot('foo.bar.y');  // y = undefined
var z = _(obj).dot('a.b.c.z');    // z = undefined