"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.subject = void 0;
const rxjs_1 = require("rxjs");
const subject = (source, mapper) => {
    const value = mapper(source.getValue());
    const observable = new rxjs_1.BehaviorSubject(value);
    source.subscribe((value) => {
        observable.next(mapper(value));
    });
    return observable;
};
exports.subject = subject;
//# sourceMappingURL=rx.js.map