Skip to main content
Module

x/abstruct/mod.ts>CountValidator

Abstract structure for JavaScript data validation
Latest
class CountValidator
extends IsValidator<Iterable<unknown>>
import { CountValidator } from "https://deno.land/x/abstruct@1.0.0/mod.ts";

Count validator.

Examples

Example 1

import { CountValidator } from "https://deno.land/x/abstruct@$VERSION/validators/iterable/count.ts";
const validator = new CountValidator(3);

Constructors

new
CountValidator(of: number)

Methods

is(input: Readonly<Iterable<unknown>>): input is Iterable<unknown>
toString(): string