From d55b767039605256c736166a942a9138e3eacfd7 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 29 Jun 2025 11:49:28 -0700 Subject: remove dev node_modules (oops) --- node_modules/rxjs/src/internal/operators/map.ts | 61 ------------------------- 1 file changed, 61 deletions(-) delete mode 100644 node_modules/rxjs/src/internal/operators/map.ts (limited to 'node_modules/rxjs/src/internal/operators/map.ts') diff --git a/node_modules/rxjs/src/internal/operators/map.ts b/node_modules/rxjs/src/internal/operators/map.ts deleted file mode 100644 index fa7305d..0000000 --- a/node_modules/rxjs/src/internal/operators/map.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function map(project: (value: T, index: number) => R): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; - -/** - * Applies a given `project` function to each value emitted by the source - * Observable, and emits the resulting values as an Observable. - * - * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), - * it passes each source value through a transformation function to get - * corresponding output values. - * - * ![](map.png) - * - * Similar to the well known `Array.prototype.map` function, this operator - * applies a projection to each value and emits that projection in the output - * Observable. - * - * ## Example - * - * Map every click to the `clientX` position of that click - * - * ```ts - * import { fromEvent, map } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const positions = clicks.pipe(map(ev => ev.clientX)); - * - * positions.subscribe(x => console.log(x)); - * ``` - * - * @see {@link mapTo} - * @see {@link pluck} - * - * @param project The function to apply to each `value` emitted by the source - * Observable. The `index` parameter is the number `i` for the i-th emission - * that has happened since the subscription, starting from the number `0`. - * @param thisArg An optional argument to define what `this` is in the - * `project` function. - * @return A function that returns an Observable that emits the values from the - * source Observable transformed by the given `project` function. - */ -export function map(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction { - return operate((source, subscriber) => { - // The index of the value from the source. Used with projection. - let index = 0; - // Subscribe to the source, all errors and completions are sent along - // to the consumer. - source.subscribe( - createOperatorSubscriber(subscriber, (value: T) => { - // Call the projection function with the appropriate this context, - // and send the resulting value to the consumer. - subscriber.next(project.call(thisArg, value, index++)); - }) - ); - }); -} -- cgit v1.2.3