This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Description
How would you solve this issue with RxJS versus core.async?
My solution would be:
var magicSequence = 'ABBABA';
var keyups = Rx.Observable.fromEvent(document, 'keyup')
.map(function (x) { return x.keyCode; })
.bufferWithCount(6, 6)
.take(1)
.timeout(5000, Rx.Observable.just([]))
.filter(function (xs) {
return xs.map(function (x) { return String.fromCharCode(x); }).join('') === magicSequence;
})
.repeat()
.subscribe(function (x) {
console.log('Magic Keys!');
});
Any thoughts @staltz, @headinthebox, @jhusain, @benjchristensen?