Skip to content

Instantly share code, notes, and snippets.

@erikjung
Last active January 26, 2016 01:01
Show Gist options
  • Save erikjung/f1a17a3bc6b828abb9ad to your computer and use it in GitHub Desktop.
Save erikjung/f1a17a3bc6b828abb9ad to your computer and use it in GitHub Desktop.
callDeep
export function callDeep (path, obj, ...args) {
var fn = path.split('.').reduce((prev, curr) => prev[curr], obj)
return fn.apply(obj, args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment