1.1.1 • Published 5 years ago
undefinedchainchecker v1.1.1
Undefined Chain Checker
This little library can be used to check if a chain of objects is not undefined. Especially to check the last object.
Example Usage
var isDefined = require('undefinedchainchecker');
var obj = {
a: {
b: {
c: 'foo'
}
}
};
isDefined(obj, 'a') // returns true
isDefined(obj, 'a.b') // returns true
isDefined(obj, 'a.b.c') // returns true
isDefined(obj, 'a.b.x') // returns false