Last active
August 29, 2015 14:27
-
-
Save boopathi/7c4adc4f4790f432838d to your computer and use it in GitHub Desktop.
Differentiate between an arrow function, class, method, generator and a normal function in ES6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should fail for
() => (function(){})
. Try/^\s*function/.test(fn)
.