mapTo
Last updated
Last updated
mapTo(value: any): Observable
New to transformation operators? Check out the article Get started transforming streams with map, pluck, and mapTo!
Example 1: Map every emission to string
( StackBlitz | jsBin | jsFiddle )
Example 2: Mapping clicks to string
( StackBlitz | jsBin | jsFiddle )
mapTo 📰 - Official docs
Changing behavior with mapTo 🎥 💵 - John Linquist
Transformation operator: map and mapTo 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/mapTo.ts