startWith.js 631 B

123456789101112131415161718
  1. /** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
  2. import { concat } from '../observable/concat';
  3. import { isScheduler } from '../util/isScheduler';
  4. export function startWith() {
  5. var array = [];
  6. for (var _i = 0; _i < arguments.length; _i++) {
  7. array[_i] = arguments[_i];
  8. }
  9. var scheduler = array[array.length - 1];
  10. if (isScheduler(scheduler)) {
  11. array.pop();
  12. return function (source) { return concat(array, source, scheduler); };
  13. }
  14. else {
  15. return function (source) { return concat(array, source); };
  16. }
  17. }
  18. //# sourceMappingURL=startWith.js.map