map.js 410 B

1234567891011
  1. import { operate } from '../util/lift';
  2. import { createOperatorSubscriber } from './OperatorSubscriber';
  3. export function map(project, thisArg) {
  4. return operate((source, subscriber) => {
  5. let index = 0;
  6. source.subscribe(createOperatorSubscriber(subscriber, (value) => {
  7. subscriber.next(project.call(thisArg, value, index++));
  8. }));
  9. });
  10. }
  11. //# sourceMappingURL=map.js.map