Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
23 lines
608 B
Plaintext
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>;
|