Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function _get(object, path, fallback) {
- const value = path.split(".").reduce((hash, field) => hash && hash[field], object);
- return typeof value === "undefined" ? fallback : value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement