UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

21 lines (20 loc) 760 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const isArguments_1 = __importDefault(require("../isArguments")); /** Built-in value reference. */ const spreadableSymbol = Symbol.isConcatSpreadable; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return Array.isArray(value) || (0, isArguments_1.default)(value) || !!(value && value[spreadableSymbol]); } exports.default = isFlattenable;