Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
714 bytes
|
Line | |
---|
1 | var baseFunctions = require('./_baseFunctions'),
|
---|
2 | keysIn = require('./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 function names.
|
---|
14 | * @see _.functions
|
---|
15 | * @example
|
---|
16 | *
|
---|
17 | * function Foo() {
|
---|
18 | * this.a = _.constant('a');
|
---|
19 | * this.b = _.constant('b');
|
---|
20 | * }
|
---|
21 | *
|
---|
22 | * Foo.prototype.c = _.constant('c');
|
---|
23 | *
|
---|
24 | * _.functionsIn(new Foo);
|
---|
25 | * // => ['a', 'b', 'c']
|
---|
26 | */
|
---|
27 | function functionsIn(object) {
|
---|
28 | return object == null ? [] : baseFunctions(object, keysIn(object));
|
---|
29 | }
|
---|
30 |
|
---|
31 | module.exports = functionsIn;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.