undefsafe
Simple function for retrieving deep object properties without getting "Cannot read property 'X' of undefined"
Usage
var object = {
a: {
b: {
c: 1,
d: [1,2,3],
e: false
}
}
};
console.log(undefsafe(object, 'a.b.e') === false);