Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
608 bytes
|
Line | |
---|
1 | var Symbol = require('./_Symbol'),
|
---|
2 | isArguments = require('./isArguments'),
|
---|
3 | isArray = require('./isArray');
|
---|
4 |
|
---|
5 | /** Built-in value references. */
|
---|
6 | var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Checks if `value` is a flattenable `arguments` object or array.
|
---|
10 | *
|
---|
11 | * @private
|
---|
12 | * @param {*} value The value to check.
|
---|
13 | * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
---|
14 | */
|
---|
15 | function isFlattenable(value) {
|
---|
16 | return isArray(value) || isArguments(value) ||
|
---|
17 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
---|
18 | }
|
---|
19 |
|
---|
20 | module.exports = isFlattenable;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.