From c51b2a55c5b3e0a9c610800a512f1e45552d94ab Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Wed, 16 Sep 2015 10:07:35 -0400 Subject: [PATCH] Fixing Issue #915 --- doc/api/core/operators/fromevent.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/api/core/operators/fromevent.md b/doc/api/core/operators/fromevent.md index 1960a7e95..a28a5114d 100644 --- a/doc/api/core/operators/fromevent.md +++ b/doc/api/core/operators/fromevent.md @@ -47,22 +47,20 @@ var EventEmitter = require('events').EventEmitter, var eventEmitter = new EventEmitter(); var source = Rx.Observable.fromEvent( - eventEmitter, - 'data', - function (foo, bar) { - return { foo: bar, bar: bar }; - }); + eventEmitter, + 'data', + function (foo, bar) { return { foo: bar, bar: bar }; }); var subscription = source.subscribe( - function (x) { - console.log('Next: foo -' + x.foo + ', bar -' + x.bar); - }, - function (err) { - console.log('Error: ' + err); - }, - function () { - console.log('Completed'); - }); + function (x) { + console.log('Next: foo -' + x.foo + ', bar -' + x.bar); + }, + function (err) { + console.log('Error: ' + err); + }, + function () { + console.log('Completed'); + }); eventEmitter.emit('data', 'baz', 'quux'); // => Next: foo - baz, bar - quux