Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created May 24, 2013 16:05
Show Gist options
  • Save vsavkin/5644551 to your computer and use it in GitHub Desktop.
Save vsavkin/5644551 to your computer and use it in GitHub Desktop.
var inputs =
query("#query").
onKeyUp.
map((event) => event.target.value).
where((text) => text.length > 2).
transform(new Throttle(500)).
distinct();
inputs.
map(queryWikipedia).
transform(new Latest()).
map((json) => json[1]).
where((list) => ! list.isEmpty).
listen(updateResults);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment