You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
12345678910111213
  1. export default function get(entity, path) {
  2. var current = entity;
  3. for (var i = 0; i < path.length; i += 1) {
  4. if (current === null || current === undefined) {
  5. return undefined;
  6. }
  7. current = current[path[i]];
  8. }
  9. return current;
  10. }