This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { |
This file contains hidden or 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 isPromise(thing) { | |
| return ( | |
| typeof thing === "object" && thing !== null | |
| && thing.then instanceof Function | |
| && thing.catch instanceof Function | |
| ); | |
| } | |
| function whileGenerates(gen, prevGenResult) { |
This file contains hidden or 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
| // Example for article : https://medium.com/@simonb90/appels-api-itératifs-avec-rxjs-a1c2593c558b | |
| /* | |
| * Definition of API method: | |
| * getEntitiesByPage(page: number): Observable<Entity[]> | |
| */ | |
| let iterator = new BehaviorSubject<number>(1); | |
| iterator.mergeMap((i) => { |
OlderNewer