forked from linkong/planet
first commit
This commit is contained in:
commit
e7033775d8
20657 files changed
+1988940
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
export default function get(entity, path) {
|
||||
var current = entity;
|
||||
for (var i = 0; i < path.length; i += 1) {
|
||||
if (current === null || current === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
current = current[path[i]];
|
||||
}
|
||||
return current;
|
||||
}
|
||||
Reference in new issue
Block a user