source: frontend/node_modules/underscore/amd/_deepGet.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 329 bytes
Line 
1define(function () {
2
3 // Internal function to obtain a nested property in `obj` along `path`.
4 function deepGet(obj, path) {
5 var length = path.length;
6 for (var i = 0; i < length; i++) {
7 if (obj == null) return void 0;
8 obj = obj[path[i]];
9 }
10 return length ? obj : void 0;
11 }
12
13 return deepGet;
14
15});
Note: See TracBrowser for help on using the repository browser.