Skip to content

Instantly share code, notes, and snippets.

@nicoespeon
Last active March 22, 2017 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoespeon/3bd17a5fb7d6f8f3fd43e5f2e37dbf3c to your computer and use it in GitHub Desktop.
Save nicoespeon/3bd17a5fb7d6f8f3fd43e5f2e37dbf3c to your computer and use it in GitHub Desktop.
Blog - Using Observables to make our app work with barcode scanners
const keyCode$ = Rx.Observable.fromEvent(document, "keypress")
// ---(ev)--(ev)--------(ev)--->
.pluck('keyCode')
// ---(43)--(51)--------(13)--->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment