UNPKG

@girders-elements/core

Version:

Girders Elements is an architectural framework that assists with building data-driven apps with React or React Native.

18 lines (13 loc) 396 B
'use strict' import R from 'ramda' import * as element from './element' export * from './element' export { element } // deprecated use /** * Like R.pipe, but the composition is immediately executed using the first arg. */ export const flow = (v, ...fs) => R.reduce((x, f) => f(x), v, fs) /** * when for reduce */ export const when = (pred, fn) => (acc, i) => (pred(i) ? fn(acc, i) : acc)