Module

x/lodash_es/mod.ts>defaultTo

lodash for deno use
Latest
function defaultTo
import { defaultTo } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/mod.ts";

Checks value to determine whether a default value should be returned in its place. The defaultValue is returned if value is NaN, null, or undefined.

Examples

_.defaultTo(1, 10); // => 1

_.defaultTo(undefined, 10); // => 10

Parameters

value

The value to check.

defaultValue

The default value.