mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
12 lines
233 B
JavaScript
12 lines
233 B
JavaScript
function get(obj, path) {
|
|
for (var i = 0, path = path.split('.'), len = path.length; i < len; i++) {
|
|
if (!obj) {
|
|
return null;
|
|
}
|
|
obj = obj[path[i]];
|
|
}
|
|
return obj;
|
|
}
|
|
exports.get = get;
|
|
;
|