Last active
November 23, 2016 15:40
-
-
Save maxhoffmann/4e1952554ddb71f0e70ea4324f5f2cb1 to your computer and use it in GitHub Desktop.
Revisions
-
Maximilian Hoffmann revised this gist
Nov 23, 2016 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ const most = require('most'); const producer = most.just().multicast(); const working = most.combine(() => 0, producer).multicast(); const broken = most.combine(() => 2, producer).startWith(1); 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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var most = require('most'); var producer = most.just().multicast(); var working = most.combine(function () { return 0; -
Maximilian Hoffmann revised this gist
Nov 23, 2016 . 2 changed files with 0 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,6 @@ const producer = most.just({ time: 0, value: false }).multicast(); const working = most.combine(() => 0, producer).multicast(); const broken = most.combine(() => 2, producer).startWith(1); working.forEach(value => document.write('working: ' + value + '<br>')); // expected: brokenConsumer should event 1 and 2 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 charactersOriginal file line number Diff line number Diff line change @@ -11,8 +11,6 @@ var broken = most.combine(function () { return 2; }, producer).startWith(1); working.forEach(function (value) { return document.write('working: ' + value + '<br>'); }); -
Maximilian Hoffmann revised this gist
Nov 23, 2016 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const broken = most.combine(() => 2, producer).startWith(1); console.clear(); working.forEach(value => document.write('working: ' + value + '<br>')); // expected: brokenConsumer should event 1 and 2 broken.forEach(value => document.write('broken: ' + value + '<br>')); 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var broken = most.combine(function () { console.clear(); working.forEach(function (value) { return document.write('working: ' + value + '<br>'); }); // expected: brokenConsumer should event 1 and 2 -
Maximilian Hoffmann revised this gist
Nov 23, 2016 . 3 changed files with 9 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ made with [esnextbin](http://esnextb.in/?gist=4e1952554ddb71f0e70ea4324f5f2cb1) 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 charactersOriginal file line number Diff line number Diff line change @@ -7,10 +7,10 @@ const broken = most.combine(() => 2, producer).startWith(1); console.clear(); working.forEach(value => document.write('broken: ' + value + '<br>')); // expected: brokenConsumer should event 1 and 2 broken.forEach(value => document.write('broken: ' + value + '<br>')); // removing one of the multicasts fixes the bug // removing startWith emits 2 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 charactersOriginal file line number Diff line number Diff line change @@ -13,10 +13,14 @@ var broken = most.combine(function () { console.clear(); working.forEach(function (value) { return document.write('broken: ' + value + '<br>'); }); // expected: brokenConsumer should event 1 and 2 broken.forEach(function (value) { return document.write('broken: ' + value + '<br>'); }); // removing one of the multicasts fixes the bug // removing startWith emits 2 -
Maximilian Hoffmann created this gist
Nov 23, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ made with [esnextbin](http://esnextb.in) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <!doctype html> <html> <head> <meta charset="utf-8"> <title>ESNextbin Sketch</title> <!-- put additional styles and scripts here --> </head> <body> <!-- put markup and other contents here --> </body> </html> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ const most = require('most'); const producer = most.just({ time: 0, value: false }).multicast(); const working = most.combine(() => 0, producer).multicast(); const broken = most.combine(() => 2, producer).startWith(1); console.clear(); working.forEach(console.log.bind(console, 'working:')); // expected: brokenConsumer should event 1 and 2 broken.forEach(console.log.bind(console, 'broken:')); // removing one of the multicasts fixes the bug // removing startWith emits 2 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ { "name": "esnextbin-sketch", "version": "0.0.0", "dependencies": { "most": "1.0.5" } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ 'use strict'; var most = require('most'); var producer = most.just({ time: 0, value: false }).multicast(); var working = most.combine(function () { return 0; }, producer).multicast(); var broken = most.combine(function () { return 2; }, producer).startWith(1); console.clear(); working.forEach(console.log.bind(console, 'working:')); // expected: brokenConsumer should event 1 and 2 broken.forEach(console.log.bind(console, 'broken:')); // removing one of the multicasts fixes the bug // removing startWith emits 2