Skip to content

Instantly share code, notes, and snippets.

-khtml-text-shadow: 1px 1px 0 rgba(255,255,255,0.8), -1px -1px 0 rgba(255,255,255,0.8), 1px -1px 0 rgba(255,255,255,0.8), -1px 1px 0 rgba(255,255,255,0.8);
-moz-text-shadow: 1px 1px 0 rgba(255,255,255,0.8), -1px -1px 0 rgba(255,255,255,0.8), 1px -1px 0 rgba(255,255,255,0.8), -1px 1px 0 rgba(255,255,255,0.8);
-webkit-text-shadow: 1px 1px 0 rgba(255,255,255,0.8), -1px -1px 0 rgba(255,255,255,0.8), 1px -1px 0 rgba(255,255,255,0.8), -1px 1px 0 rgba(255,255,255,0.8);
text-shadow: 1px 1px 0 rgba(255,255,255,0.8), -1px -1px 0 rgba(255,255,255,0.8), 1px -1px 0 rgba(255,255,255,0.8), -1px 1px 0 rgba(255,255,255,0.8);
filter: glow(color=white,strength=1);
@xgrommx
xgrommx / index.js
Last active June 11, 2017 05:26
How we can make methods of observable via other methods
const flatMapLatest = (fn, stream) =>
stream.publish(s => s.flatMap(v => fn(v).takeUntil(s)));
const flatMapLatest = (fn, stream, resultSelector) => stream.publish(s => {
return s.flatMap(v => fn(v).map(v2 => resultSelector(v, v2)).takeUntil(s));
});
const delay = (source, delay) => source.flatMap(e => Rx.Observable.timer(delay).mapTo(e))
const debounceTime = (time, stream) => flatMapLatest(v => of(v).delay(time), stream);