A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
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 {Injectable} from 'angular2/core'; | |
import {Http} from 'angular2/http'; | |
import {Observable} from 'rxjs/Observable'; | |
import 'rxjs/add/operator/map'; | |
const GITHUB_API_URL = 'https://api.github.com'; | |
export class Repository { | |
name: string; | |
full_name: string; |
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 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); |
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
(function() { | |
function hideEvertyhingAround($el) { | |
const $parent = $el.parentElement; | |
$parent.style.transition = 'background-color 150ms ease-in'; | |
$parent.style.backgroundColor = 'white'; | |
$parent.childNodes.forEach($child => { | |
if($child !== $el && $child.style) { |
This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf
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
// Name: Maker Suite Playground | |
import "@johnlindquist/kit" | |
import { dictate } from "../kenvs/maggie-kit/lib/ai-editor-kit" | |
const { v1beta2 } = await import("@google-ai/generativelanguage") | |
const { TextServiceClient } = v1beta2 | |
const { GoogleAuth } = await import("google-auth-library") | |
const MODEL_NAME = "models/text-bison-001" |