UNPKG

@constructorfleet/ultimate-govee

Version:

Library for interacting with Govee devices written in Typescript.

25 lines 847 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PartialBehaviorSubject = void 0; const rxjs_1 = require("rxjs"); class PartialBehaviorSubject extends rxjs_1.BehaviorSubject { constructor() { super(...arguments); this.partial$ = new rxjs_1.Subject(); } partialSubscribe(observer) { return this.partial$.subscribe(observer); } partialNext(value) { this.partial$.next(value); const current = this.getValue(); if (current !== undefined && current !== null && typeof current === 'object') { Object.entries(current).forEach(([k, v]) => (current[k] = v)); } this.next(current); } } exports.PartialBehaviorSubject = PartialBehaviorSubject; //# sourceMappingURL=partial-subject.observable.js.map