Skip to content

Instantly share code, notes, and snippets.

@claudiopro
claudiopro / .gitignore
Last active November 10, 2017 20:24 — forked from rauchg/README.md
require-from-dat
/node_modules/
module.js
@FQ400
FQ400 / braching.js
Last active September 15, 2017 07:42
Branching in functional javascript using Ramda
import R from 'ramda';
const payloadSizeWithinLimit = (payload, limit) => limit > payload.size;
const errorState = { name: 'can not be empty' };
const sizeInBytes = 50000;
let errorObj;
errorObj = R.cond([
[R.equals(true), R.always({})],