Skip to main content
Module

x/fae/mod.ts>propOr

A functional module for Deno inspired from Ramda.
Latest
variable propOr
import { propOr } from "https://deno.land/x/fae@v1.1.1/mod.ts";

If the given, non-null object has an own property with the specified name, returns the value of that property. Otherwise returns the provided default value. const fae = { name: 'Fae', age: 15 } const Great = Fae.prop('GreatLibrary') const GreatWithDefault = Fae.propOr('FaeModule', 'GreatLibrary')

 Great(fae)  //=> undefined
 GreatWithDefault(fae) //=> 'FaeModule'

type

PropOr