Skip to content

assertcheck v1.0.0


assertcheck / assert / shorterThan

Function: shorterThan() ​

ts
function shorterThan<T>(
   arr, 
   n, 
   opts?): void;

Defined in: src/assert.ts:811

Asserts that the array has fewer than n elements.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
arrT[]
nnumber
opts?Opts

Returns ​

void

Example ​

ts
`assert.shorterThan(queue, 1000, "queue overflow")`

Released under the Apache 2.0 License. Built by Vagabond Studio — senior-only for growing companies.