(value: unknown)
| 35 | * @function |
| 36 | */ |
| 37 | export function isArray<T = unknown>(value: unknown): value is T[] { |
| 38 | if (Array.isArray && Array.isArray(value)) { |
| 39 | return true; |
| 40 | } |
| 41 | const type = Object.prototype.toString.call(value); |
| 42 | if (type.slice(0, 7) === class="st">'[object' && type.slice(-6) === class="st">'Array]') { |
| 43 | return true; |
| 44 | } |
| 45 | return false; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Returns true if `value` is an object (excluding null), else returns false. |
no outgoing calls
no test coverage detected