Created
June 12, 2019 19:16
-
-
Save miguel-leon/5701fafb81a443423057cfe6f8b9456a to your computer and use it in GitHub Desktop.
safe access deep properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const idx = (o, ...p) => p.reduce((a, i) => a && a[i], o) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment