Guest User

Untitled

a guest
Jan 24th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. function resolve(path, obj=self, separator='.') {
  2. var properties = Array.isArray(path) ? path : path.split(separator)
  3. return properties.reduce((prev, curr) => prev && prev[curr], obj)
  4. }
Add Comment
Please, Sign In to add comment