A function prefix is one of more words at the start of a function name.
For example:
- the
is
inisValue()
- the
mustBe
inmustBeValue()
We use function prefixes to tell the end-user what kind of work a function does.
For example:
- anything starting with
is
is a type guard - anything starting with
mustBe
is a type guarantee - anything starting with
make
is a smart constructor
and so on.