Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 889 Bytes

File metadata and controls

46 lines (28 loc) · 889 Bytes

Creates a notification callback from an observer.

Returns

(Function): The function that forwards its input notification to the underlying observer.

{% if book.isPdf %}

var observer = Rx.Observer.create(
  x => console.log(`onNext: ${x}`),
  e => console.log(`onError: ${e}`),
  () => console.log('onCompleted'));

var notifier = observer.toNotifier();

// Invoke with onNext
notifier(Rx.Notification.createOnNext(42));
// => onNext: 42

// Invoke with onCompleted
notifier(Rx.Notification.createOnCompleted());
// => onCompleted

{% else %}

Example

{% endif %}

{% if book.isPdf %}

{% else %}

Location

  • rx.js

{% endif %}