import { BehaviorSubject } from 'rxjs';
export const subject = (source, mapper) => {
    const value = mapper(source.getValue());
    const observable = new BehaviorSubject(value);
    source.subscribe((value) => {
        observable.next(mapper(value));
    });
    return observable;
};
//# sourceMappingURL=rx.js.map