mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Remove “in” variants.
This commit is contained in:
30
keysIn.js
30
keysIn.js
@@ -1,30 +0,0 @@
|
||||
import arrayLikeKeys from './.internal/arrayLikeKeys.js';
|
||||
import baseKeysIn from './.internal/baseKeysIn.js';
|
||||
import isArrayLike from './isArrayLike.js';
|
||||
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.a = 1;
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
*
|
||||
* keysIn(new Foo);
|
||||
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
||||
*/
|
||||
function keysIn(object) {
|
||||
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
||||
}
|
||||
|
||||
export default keysIn;
|
||||
Reference in New Issue
Block a user