Additional isArray (w/ is* opts) (#1166)

This commit is contained in:
Jaco
2021-11-06 15:56:51 +02:00
committed by GitHub
parent bf4c6b497f
commit 644f32dfaa
5 changed files with 14 additions and 8 deletions
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2021 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
/**
* @name isArray
* @summary Tests for a Array instance.
*/
export function isArray <T> (value: unknown): value is Array<T> {
return Array.isArray(value);
}