artdaq_node_server  v1_00_07
 All Classes Namespaces Files Variables Pages
_baseGet.js
1 var castPath = require('./_castPath'),
2  toKey = require('./_toKey');
3 
12 function baseGet(object, path) {
13  path = castPath(path, object);
14 
15  var index = 0,
16  length = path.length;
17 
18  while (object != null && index < length) {
19  object = object[toKey(path[index++])];
20  }
21  return (index && index == length) ? object : undefined;
22 }
23 
24 module.exports = baseGet;