Example 1 — Official: Own Function Names
Own function properties are listed; the prototype method is skipped.
function Foo() {
this.a = _.constant('a');
this.b = _.constant('b');
}
Foo.prototype.c = _.constant('c');
_.functions(new Foo);
// → ['a', 'b'] How It Works
- Own props.
aandbare functions on the instance. - Prototype.
clives onFoo.prototype. - Filter. Only own enumerable function names are kept.
- Result.
["a", "b"]—cis excluded.

