Lodash functionsIn method
语法
Creates an array of function property names from own and inherited enumerable properties of object.
参数
object (Object) − The object to inspect.
输出
(Array) − Returns the function names.
实例
var _ = require('lodash');
function Foo() {
this.a = _.constant('a');
this.b = _.constant('b');
}
Foo.prototype.c = _.constant('c');
console.log(_.functionsIn(new Foo));
Save the above program in
tester.js. Run the following command to execute this program.
Command
输出