Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function Store(seed, action$) {
options = R.merge(makeStore.options, options)
let self = {options} // no OOP
self.$ = action$
.merge(K.constant(seed))
.scan((state, fn) => fn(state))
.skipDuplicates()
return self
}
}
it('should behave normally if not embeddable', () => {
const actual = render(
);
expect(actual.toString()).to.equal('<div>[constant] {}</div>');
});
describe("fromKefir", () => {
testRender(fromKefir(Kefir.constant(<p>Yes</p>)), '<p>Yes</p>')
})
function filterRetweets (tweet) {
if (tweet.retweeted_status) {
addToFoundTweets(tweet);
searchPool.plug(kefir.constant(tweet.retweeted_status));
}
if (tweet.quoted_status) {
addToFoundTweets(tweet);
searchPool.plug(kefir.constant(tweet.quoted_status));
}
return !tweet.retweeted &&
!tweet.retweeted_status &&
!tweet.quoted_status;
}
testEq(3, () => U.thru(C({x: 1}), L.get(C('x')), R.add(C(2))))
export let init = (seed) =>
K.constant(function init() { return seed })
).flatMap(diagramIri => {
this.workspace.getModel().history.reset();
if (this.props.postSaving === 'navigate') {
const props = {...this.props.queryParams, diagram: diagramIri.value};
return navigateToResource(Rdf.iri(this.props.navigateTo), props);
}
this.setState({diagramIri: diagramIri.value});
return Kefir.constant(undefined);
}).map(results => {
trigger({
finalize: (values, owner) => Kefir.constant(values),
};
.flatMapErrors((err: TypeError) => Kefir.constant(messagesFetchFailed(err))),
]);
function toProp(s, initial) {
return s.merge(Kefir.constant(initial)).toProperty()
}