Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

of.js 867B

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var isScheduler_1 = require("../util/isScheduler");
  4. var fromArray_1 = require("./fromArray");
  5. var empty_1 = require("./empty");
  6. var scalar_1 = require("./scalar");
  7. function of() {
  8. var args = [];
  9. for (var _i = 0; _i < arguments.length; _i++) {
  10. args[_i] = arguments[_i];
  11. }
  12. var scheduler = args[args.length - 1];
  13. if (isScheduler_1.isScheduler(scheduler)) {
  14. args.pop();
  15. }
  16. else {
  17. scheduler = undefined;
  18. }
  19. switch (args.length) {
  20. case 0:
  21. return empty_1.empty(scheduler);
  22. case 1:
  23. return scheduler ? fromArray_1.fromArray(args, scheduler) : scalar_1.scalar(args[0]);
  24. default:
  25. return fromArray_1.fromArray(args, scheduler);
  26. }
  27. }
  28. exports.of = of;
  29. //# sourceMappingURL=of.js.map