1 | import baseFunctions from './_baseFunctions';
|
2 | import keysIn from './keysIn';
|
3 |
|
4 | /**
|
5 | * Creates an array of function property names from own and inherited
|
6 | * enumerable properties of `object`.
|
7 | *
|
8 | * @static
|
9 | * @memberOf _
|
10 | * @since 4.0.0
|
11 | * @category Object
|
12 | * @param {Object} object The object to inspect.
|
13 | * @returns {Array} Returns the new array of property names.
|
14 | * @example
|
15 | *
|
16 | * function Foo() {
|
17 | * this.a = _.constant('a');
|
18 | * this.b = _.constant('b');
|
19 | * }
|
20 | *
|
21 | * Foo.prototype.c = _.constant('c');
|
22 | *
|
23 | * _.functionsIn(new Foo);
|
24 | * // => ['a', 'b', 'c']
|
25 | */
|
26 | function functionsIn(object) {
|
27 | return object == null ? [] : baseFunctions(object, keysIn(object));
|
28 | }
|
29 |
|
30 | export default functionsIn;
|