Skip to content

Instantly share code, notes, and snippets.

@seanislegend
seanislegend / rxjs-example-poll-url.js
Last active August 12, 2019 09:43
RxJS - Poll a URL
let timeout = 1000;
/**
* Create a custom observable that creates a XHR request and returns complete when the promise is fulfilled
*/
let observable = Rx.Observable.create((o) => {
dataService.fetch('test.json')
.then((data) => {
o.onNext(data);
o.onCompleted();
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math