defaulter()

Creates a partial function which will always default to another value when non-values are passed to it.

This function is valid in v2.8.0 to v2.24.3. This function has been downloaded 60 times.

Parameters

{*} defaultValue
Value to default to if the value passed to the partial function is not sufficient.
{boolean=} opt_beStrict Optional, Default:false
Specifies whether or not to only check if the value passed to the partial function is undefined.

Returns

{*}
A partial function which will return either the value passed in or defaultValue based on the following criteria: If opt_beStrict is true-ish and value is undefined, defaultValue will be returned. If opt_beStrict is false-ish and value is undefined, null or NaN, defaultValue will be returned. In all other cases value will be returned.

Required Function

This function directly requires the following function which is included automatically:

  • defaultTo()
    Defaults specific non-values to another given value.

Requiring Function

This function is directly required by the following function:

  • defaultTo()
    Defaults specific non-values to another given value.