Skip to content

Function: ensureNonEmptyString

core.ensureNonEmptyString

ensureNonEmptyString(value, message?): string

Helper to check that a given value is a string, and is not the empty string. If the value is not a string or is empty, an error will be raised at runtime.

Parameters

Name Type
value undefined | null | string
message? string

Returns

string

Defined in

helpers/ensure.ts:37