main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
776 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import arrayLikeKeys from './_arrayLikeKeys.js';
|
---|
| 2 | import baseKeysIn from './_baseKeysIn.js';
|
---|
| 3 | import isArrayLike from './isArrayLike.js';
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * Creates an array of the own and inherited enumerable property names of `object`.
|
---|
| 7 | *
|
---|
| 8 | * **Note:** Non-object values are coerced to objects.
|
---|
| 9 | *
|
---|
| 10 | * @static
|
---|
| 11 | * @memberOf _
|
---|
| 12 | * @since 3.0.0
|
---|
| 13 | * @category Object
|
---|
| 14 | * @param {Object} object The object to query.
|
---|
| 15 | * @returns {Array} Returns the array of property names.
|
---|
| 16 | * @example
|
---|
| 17 | *
|
---|
| 18 | * function Foo() {
|
---|
| 19 | * this.a = 1;
|
---|
| 20 | * this.b = 2;
|
---|
| 21 | * }
|
---|
| 22 | *
|
---|
| 23 | * Foo.prototype.c = 3;
|
---|
| 24 | *
|
---|
| 25 | * _.keysIn(new Foo);
|
---|
| 26 | * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
---|
| 27 | */
|
---|
| 28 | function keysIn(object) {
|
---|
| 29 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | export default keysIn;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.