-/**
- * Returns whether the provided value is spreadable during array
- * concatenation.
- *
- * This is also used to determine which things should be treated as
- * collections.
- */
-export const isConcatSpreadable = ($) => {
- if (type($) !== "object") {
- // The provided value is not an object.
- return false;
- } else {
- // The provided value is an object.
- const spreadable = $[Symbol.isConcatSpreadable];
- return spreadable !== undefined ? !!spreadable : isArray($);
- }
-};
-
-/** Returns whether the provided value is an integer index string. */
-export const isIntegerIndexString = ($) => {
- const value = canonicalNumericIndexString($);
- if (value !== undefined && isIntegralNumber(value)) {
- // The provided value is a canonical numeric index string.
- return sameValue(value, 0) ||
- value > 0 && value <= MAXIMUM_SAFE_INTEGRAL_NUMBER &&
- value === toLength(value);
- } else {
- // The provided value is not a canonical numeric index string.
- return false;
- }
-};
-