Rx.helpers.just(value)

A function which takes an argument and returns a function, when invoked, returns the argument.

Arguments

  1. value (Any): The value to return.

Returns

(Function): A function, when invoked, returns the value.

Example

var just = Rx.helpers.just;

Rx.Observable.timer(100)
  .map(just('foo'))
  .subscribe(console.log.bind(console));
// => foo