Skip to content

assertcheck v1.0.0


assertcheck / assert / empty

Function: empty()

ts
function empty(v, opts?): void;

Defined in: src/assert.ts:134

Asserts that a value is empty. Uses _.isEmpty, which handles strings, arrays, objects, Map, and Set.

Parameters

ParameterTypeDescription
vunknownThe value to check.
opts?OptsOptional message / context.

Returns

void

Example

ts
assert.empty(errors, "no errors expected")

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