How to list the functions/methods of a javascript object? (Is it even possible?)

BenoitParis picture BenoitParis · Dec 4, 2010 · Viewed 22.5k times · Source

This question is intentionally phrased like this question.

I don't even know if this is possible, I remember vaguely hearing something about some properties not enumerable in JS.

Anyway, to cut a long story short: I'm developing something on a js framework for which I have no documentation and no easy access to the code, and it would greatly help to know what I can do with my objects.

Answer

Allan Tokuda picture Allan Tokuda · Sep 4, 2013

If you include Underscore.js in your project, you can use _.functions(yourObject).