R.curry(function (send, state) { return h('header', { className: 'header' }, [ h('h1', {}, 'todos'), render_new_input(send, state) ]) })
pipeP( () => curry(createCategoryApi) .then((res) => Either.Right(res.data.result)) .catch((err) => Either.Left(new Error('Create category fail'))), Either.either(showError, completeCreateCategory), )
const getSquashedScore = async (metrics) => ({ lighthouse: R.pipe( R.map((metric) => R.sum(R.values(metric))), R.sum, R.divide(R.__, R.length(metrics) * R.length(R.keys(R.head(metrics)))), R.curry(Math.round), )(metrics), })
R.curry(function (send, state) { const items = get_sorted_items(state.items) const make_li = render_list_item(send, state) return h('ul', { className: 'todo-list' }, R.map(make_li, items)) })
curry(({ componentDidMount = noop }, component) => createClass({ // eslint-disable-line react/prefer-es6-class displayName: `${component.displayName || component.name}StatefullWrapper`, propTypes: component.propTypes, getDefaultProps: always(component.defaultProps), componentDidMount: wrapStatelessFunction(componentDidMount), render() { return createElement(component, this.props, ...(this.props.children || [])); }, }))
curry((input, propName, result) => useWith( (newProp, propName, target) => ifElse( () => !newProp, () => target, () => set(lensProp(propName), newProp, target), )(), [ prop(propName) ] )(input, propName, result))
R.curry((fn, keyCol, valCol, table) => R.pipe( R.groupWith(R.eqBy(R.omit([keyCol, valCol]))), R.map((rowGroup) => R.reduce( R.mergeWith(fn), R.omit([keyCol, valCol], rowGroup[0]), rowGroup.map((row) => ({ [row[keyCol]]: row[valCol] })) )), )(table))
curry((char, val) => { if (firstChar(val) === char) { return trimChar(char, drop(1, val)); } if (lastChar(val) === char) { return trimChar(char, take(val.length - 1, val)); } return val; })
R.curry( (config, imageTag) => `${config.AWS_ACCOUNT_ID}.dkr.ecr.${config.REGION}.amazonaws.com/${config.REPO_TO_CLEAN}${addTag( imageTag )}` )
curry((propName, newValue, target) => ifElse( () => !newValue, () => target, () => set(lensProp(propName), newValue, target) )())
R.curry(function onlyIfUncurried<T>( condition: boolean | (() => boolean), value: T | (() => T), ): ?T { return execIfFunc(condition) ? execIfFunc<T>(value) : undefined })
R.curry(function (send, state) { return input(R.pipe(new_item, send), { // autoFocus: true, className: 'new-todo', placeholder: 'What needs to be done?' }) })
curry((response, request) => merge(request, { original: request, // legacy request, response }))
R.curry((obj, key) => { if (typeof obj[key] === 'undefined') { return false } return true })
const callCreateProductApi = ({ categoryCode, product }) => pipeP( () => curry(createProductApi)(categoryCode)(product) .then((res) => Either.Right(res.data.result)) .catch((err) => Either.Left(new Error('Create Product fail'))), Either.either(showError, completeCreateProduct), )({ categoryCode, product})