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 617B

12345678910111213141516171819202122
  1. import { isScheduler } from '../util/isScheduler';
  2. import { fromArray } from './fromArray';
  3. import { empty } from './empty';
  4. import { scalar } from './scalar';
  5. export function of(...args) {
  6. let scheduler = args[args.length - 1];
  7. if (isScheduler(scheduler)) {
  8. args.pop();
  9. }
  10. else {
  11. scheduler = undefined;
  12. }
  13. switch (args.length) {
  14. case 0:
  15. return empty(scheduler);
  16. case 1:
  17. return scheduler ? fromArray(args, scheduler) : scalar(args[0]);
  18. default:
  19. return fromArray(args, scheduler);
  20. }
  21. }
  22. //# sourceMappingURL=of.js.map