|> map

import { map } from '@hullo/core'

Use this operator to transform messages coming through a source Observable. Transforming function gets a message as an argument and should return a value to be sent through resulting Observable.

import { new Observable, map } from '@hullo/core';
new Observable(observer => {
observer.next(Math.round(Math.random() * 100));
})
.pipe(map(n => n * 2))
.subscribe({
next: v => { console.log(v, 'is an even number') }
});