Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 330 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 330 Bytes

Usage

var dig = require('dig-for').dig;

var deeplyNested = { one: { two: { three: { four: 5 } } } };

dig.one(deeplyNested);
// => { two: { three: { four: 5 } } }
dig.one.two(deeplyNested);
// => { three: { four: 5 } }
dig.one.two.three(deeplyNested);
// => { four: 5 }
dig.one.two.three.four(deeplyNested);
// => 5