Assert that a value is set and throw a MissingValueError if it is not, i.e., both null and undefined values will throw an error. This can be nice to use when transforming data between view model and rest api model.
the value asserted to be set.
an optional exception message to use if the check fails.
the value unambiguously defined.
MissingValueError if value is not set.
Assert that a value is set and throw a MissingValueError if it is not, i.e., both null and undefined values will throw an error. This can be nice to use when transforming data between view model and rest api model.