UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS, CSS and JSON.

17 lines (14 loc) 489 B
var isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLikeObject = require('./isArrayLikeObject'); /** * 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 isArrayLikeObject(value) && (isArray(value) || isArguments(value)); } module.exports = isFlattenable;