UNPKG

@storm-stack/types

Version:

⚡ The storm-stack monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.

7 lines (6 loc) 374 B
import { isEmpty } from "./is-empty.mjs"; import { isNumber } from "./is-number.mjs"; import { isObject } from "./is-object.mjs"; export const isArrayLike = (value) => { return isObject(value) && !isEmpty(value) && "length" in value && isNumber(value.length) && (value.length === 0 || value.length > 0 && Object.prototype.hasOwnProperty.call(value, value.length - 1)); };