startWith.js 521 B

1234567891011121314
  1. import { concat } from '../observable/concat';
  2. import { popScheduler } from '../util/args';
  3. import { operate } from '../util/lift';
  4. export function startWith() {
  5. var values = [];
  6. for (var _i = 0; _i < arguments.length; _i++) {
  7. values[_i] = arguments[_i];
  8. }
  9. var scheduler = popScheduler(values);
  10. return operate(function (source, subscriber) {
  11. (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);
  12. });
  13. }
  14. //# sourceMappingURL=startWith.js.map