Skip to content

isCollection

@tsed/core

Usage ​

typescript
import { isCollection } from "@tsed/core";

See /packages/core/src/utils/isCollection.ts.

Overview ​

ts
function isCollection(target: any): boolean;

Description ​

Determines whether a value is a collection type (Array, Map, Set, WeakMap, WeakSet).

Checks both the constructor itself and instances of these collection types.

Released under the MIT License.