Skip to content

Instantly share code, notes, and snippets.

@gdekefir
Created August 2, 2017 20:41
Show Gist options
  • Save gdekefir/fc74b086052c3d2fc73c98f79e3a1f6c to your computer and use it in GitHub Desktop.
Save gdekefir/fc74b086052c3d2fc73c98f79e3a1f6c to your computer and use it in GitHub Desktop.
Getting prop value via ramda and fantasy-birds
//const fn = obj => key => key => propOr(key, key, obj);
const fn = warblerstar(robinstar(propOr));
const src = {
some: 22,
other: 33
};
fn(src, 'some'); //-> 22
fn(src, 'qqq'); //-> 'qqq'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment