Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const model = actions => {
const message$ = Rx.Observable.merge(
actions.changeMessage$,
// we listen to this observable
// because when the submit button is clicked
// we want to clear the message input out
actions.submitMessage$.map(x => '')
).startWith('')
return Observable.combineLatest(
allPusherMessages$,
actions.submitUsername$.startWith(''),
message$,
(pusherMessages, username, message) => ({ pusherMessages, username, message })
);
};
export default (state$, logicField$) =>
O.combineLatest(state$, logicField$, render)
;
export const WriteBuffer = ({FILE, fd$, buffer$}) => {
const Write = R.compose(FILE.write, CreateWriteBufferParams)
return O.combineLatest(fd$, buffer$).flatMap(params => {
return Write(params).map(R.concat(R.nth(1, params)))
})
}
/**
let deriveN = curry((deriveFn, os) => {
return $.combineLatest(...os, deriveFn).distinctUntilChanged().shareReplay(1)
})
function view(state$, isFocus$, id, labelName){
const vtree$ = Observable.combineLatest(state$, isFocus$,
( value, focus ) =>
div({className: styles.group},
[
input({id, required: true, className: styles.input, value}),
span({className: styles.bar}),
label({for: id, className: ( focus || value ? styles.labelActive : styles.labelInactive)}, labelName),
])
);
return vtree$;
}
const model = (actions$) => {
return Observable.combineLatest(actions$)
.map(([ tree, sel, ...x ]) => [ last(tree), sel, getContents(tree, sel), ...x ])
}
export const processAssetFiles = curry(function (opts, serveAssets, config) {
return Observable.combineLatest(
processJsFile(opts, serveAssets, config),
processCssFile(opts, serveAssets, config),
processHtmlFile(opts, serveAssets, config)
);
});
let User = function ({state, params}) {
return {
DOM: Observable.combineLatest(
Menu(state), params,
(menu, params) => {
return div([
h1("User #" + params.id),
menu,
p(["[user" + params.id + " content]"])
])
})
}
}
{ className: R.join(' ', R.concat(['button'], props.classNames)) },
props.label)
);
const parsedActions$ = Observable.combineLatest(
dates$,
lists$,
actions$,
currentDate$,
({ startDate, endDate }, lists, actions, currentDate) => R.compose(
filterBetweenDates(startDate, nextDay(endDate)),
parseActions(currentDate, lists)
)(actions)
);
const graph$ = Observable.combineLatest(
displayedLists$,
parsedActions$,
parseToGraph
);
return {
DOM: vtree$,
Trello: clicks$,
Graph: graph$,
CSV: graph$.map(graphToCSV),
};
}