import { defaultTo } from "https://deno.land/x/fae@v1.1.1/mod.ts";
Returns the second argument if it is not null
, undefined
or NaN
;
otherwise the first argument is returned.
const defaultTo125 = Fae.defaultTo(125)
defaultTo125(null) //=> 125
defaultTo125(undefined) //=> 125
defaultTo125(false) //=> false
defaultTo125('Fae') //=> 'Fae'