主题
functionsIn
js
_.functionsIn(object)
从 object
自身和继承的可枚举属性创建一个函数属性名称数组。
¥Creates an array of function property names from own and inherited enumerable properties of object
.
新增于
¥Since
4.0.0
参数
¥Arguments
object
(对象):要反转的对象。¥
object
(Object): The object to inspect.
返回
¥Returns
(数组):返回函数名称。
¥(Array): Returns the function names.
示例
¥Example
js
function Foo() {
this.a = _.constant('a');
this.b = _.constant('b');
}
Foo.prototype.c = _.constant('c');
_.functionsIn(new Foo);
// => ['a', 'b', 'c']