made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Rx = require('Rx') | |
const O = Rx.Observable | |
const R = require('ramda') | |
function SlimShady (signal$) { | |
return signal$ | |
.delay(500).map((x) => x + 1) | |
} | |
const coprophagus = R.curry((funct, signal$) => { |
made with esnextbin
made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component} from 'react' | |
import {Subject, Observable as O} from 'rx' | |
import R from 'ramda' | |
const isFunction = R.compose(R.equals('Function'), R.type) | |
const isObservable = i => i instanceof O | |
const toObservable = i => { | |
const canSkip = R.anyPass([isFunction, isObservable]) | |
return canSkip(i) ? i : O.just(i) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Subject} from 'rx' | |
import {Component} from 'react' | |
import R from 'ramda' | |
const appendPrefix = (x) => ['@PROPS.' + x[0], x[1]] | |
const propPair = R.compose(R.map(appendPrefix), R.toPairs) | |
export class SmartyPants extends Component { | |
constructor () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import R from 'ramda' | |
export default (config) => { | |
const ofPath = R.path(R.__, config) | |
const _appendToPath = R.useWith(R.over, [R.lensPath, R.append]) | |
const _plugin = _appendToPath(['plugins']) | |
const _loader = _appendToPath(['module', 'loaders']) | |
const _if = R.uncurryN(3, condition => R.ifElse(R.always(condition), R.__, R.identity)) | |
const _copyFrom = R.useWith(R.set, [R.lensPath, ofPath, R.identity]) | |
const _set = R.useWith(R.set, [R.lensPath, R.identity, R.identity]) |
made with esnextbin
made with esnextbin
made with esnextbin