Skip to content

Function: ensureNonEmptyString()

ensureNonEmptyString(value, message?): string

Defined in: helpers/ensure.ts:37

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

Parameter Type
value string | null | undefined
message? string

Returns

string