Files
SnowLuma/.pnpm-store/v11/files/c2/48549b606f83cfc2bdc0b3937449d76368c9624704210bcb550c45c7f2c23664694fb62d051f8897e32b3d919a391900357f79cc2bb7f30d2aef2936fd190c
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

23 lines
608 B
Plaintext

/**
* Check if the value is array-like
*
* 校验是否是类数组
*
* @example
* ```js
* import { isArrayLike } from 'is-what-type';
*
* isArrayLike([1, 2, 3]); // true
* isArrayLike('hello'); // true
* isArrayLike({ length: 3, 0: 'a', 1: 'b', 2: 'c' }); // true
* isArrayLike(function() {}); // false
* isArrayLike(null); // false
* isArrayLike(undefined); // false
* isArrayLike({}); // false
* ```
*
* @param value - The value to check
* @returns `true` if the value is array-like, else `false`
*/
export declare function isArrayLike<T = any>(value: unknown): value is ArrayLike<T>;