Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / functions.js
1 var baseFunctions = require('./_baseFunctions'),
2     keys = require('./keys');
3
4 /**
5  * Creates an array of function property names from own enumerable properties
6  * of `object`.
7  *
8  * @static
9  * @memberOf _
10  * @category Object
11  * @param {Object} object The object to inspect.
12  * @returns {Array} Returns the new array of property names.
13  * @example
14  *
15  * function Foo() {
16  *   this.a = _.constant('a');
17  *   this.b = _.constant('b');
18  * }
19  *
20  * Foo.prototype.c = _.constant('c');
21  *
22  * _.functions(new Foo);
23  * // => ['a', 'b']
24  */
25 function functions(object) {
26   return object == null ? [] : baseFunctions(object, keys(object));
27 }
28
29 module.exports = functions;