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
(function () { | |
var makeCallback = function(eventType, observer) { | |
if (eventType === 'value') { | |
return function(snap) { | |
observer.onNext(snap); | |
}; | |
} else { | |
return function(snap, prevName) { | |
// Wrap into an object, since we can only pass one argument through. | |
observer.onNext({snapshot: snap, prevName: prevName}); |