Initial commit
This commit is contained in:
11
node_modules/passport-local/lib/utils.js
generated
vendored
Normal file
11
node_modules/passport-local/lib/utils.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
exports.lookup = function(obj, field) {
|
||||
if (!obj) { return null; }
|
||||
var chain = field.split(']').join('').split('[');
|
||||
for (var i = 0, len = chain.length; i < len; i++) {
|
||||
var prop = obj[chain[i]];
|
||||
if (typeof(prop) === 'undefined') { return null; }
|
||||
if (typeof(prop) !== 'object') { return prop; }
|
||||
obj = prop;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user