Date

“Object” Methods

_.functions(object)

source npm package

Creates an array of function property names from own enumerable properties of object.

引入版本

0.1.0

参数
object (Object) : The object to inspect.

返回值
(Array) : Returns the function names.

示例
function Foo() {
  this.a = _.constant('a');
  this.b = _.constant('b');
}
 
Foo.prototype.c = _.constant('c');
 
_.functions(new Foo);
// => ['a', 'b']