Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
739 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var arrayPush = require('./_arrayPush'),
|
---|
| 2 | isArray = require('./isArray');
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
---|
| 6 | * `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
---|
| 7 | * symbols of `object`.
|
---|
| 8 | *
|
---|
| 9 | * @private
|
---|
| 10 | * @param {Object} object The object to query.
|
---|
| 11 | * @param {Function} keysFunc The function to get the keys of `object`.
|
---|
| 12 | * @param {Function} symbolsFunc The function to get the symbols of `object`.
|
---|
| 13 | * @returns {Array} Returns the array of property names and symbols.
|
---|
| 14 | */
|
---|
| 15 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
---|
| 16 | var result = keysFunc(object);
|
---|
| 17 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | module.exports = baseGetAllKeys;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.