1.0.0 • Published 5 years ago
triable v1.0.0
Triable
Get an object's props without check if the prop exist
How to use
var Triable = require('triable');
var foo = {
bar: {
foobar: 'test'
}
}
var instance = new Triable(foo);
instance.try('bar').try('foobar').getValue(); //=> test
instance.try('bar').try('foobar').try('something').try('somethingelse').getValue(); //=> undefined
1.0.0
5 years ago