Skip to content

assertcheck v1.0.0


assertcheck / assert / nonDecreasing

Function: nonDecreasing() ​

ts
function nonDecreasing(arr, opts?): void;

Defined in: src/assert.ts:1191

Asserts that numeric array elements are non-decreasing (allows equal values).

Parameters ​

ParameterType
arrnumber[]
opts?Opts

Returns ​

void

Example ​

ts
`assert.nonDecreasing(scores, "scores must not decrease")`

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