Exploring functions in the Chrome Dev tools
Edit: an easier way is console.dir(fn)
. Thanks to @ELV1S on Twitter.
If you have a function with properties directly on it, logging it directly in the Chrome dev tools console will do toString
and you'll just see its source:
However, if you wrap it in an object, then you can use get disclosure triangle that allows you to explore all of it's properties:
Much better!
Written by Stuart Knightley
Related protips
2 Responses
Awesome job! I can't wait to try putting it to use!
over 1 year ago
·
Dinky tip!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Chrome
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#