Last active
July 30, 2016 14:47
-
-
Save electerious/628ef7a18207166999576b64f8c88e14 to your computer and use it in GitHub Desktop.
Try to execute a function and discard any error that occurs
This file contains hidden or 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 nicetry = (fn) => { | |
try { return fn() } | |
catch (e) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved to nice-try.