Created
April 1, 2015 16:30
-
-
Save kolesnick/69676ab2368765321fea to your computer and use it in GitHub Desktop.
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
fromAll() | |
.when({ | |
$init: function () { | |
return { count: 0 }; // initial state | |
}, | |
$any: function (state, event) { | |
if (event.metadata.EventSourceId.indexOf("$") !== 0) { | |
state.count += 1; | |
} | |
return state; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment