Rx add-ons
Installation
$ npm i rxjs-addons -S
Example usage
AttributesProxySubject
;const subject = a: 1 b: 2 schema: a: getter: true setter: true b: subject ; console // 1console // undefined subjectb$; /* b: 2 */
ErrorSubject
;const subject = ; subject; // regular catchtry throw "Error"; catch err subject; // or errorSubject.next(err); // wrapping promise or async function subject;subject; // wrapping promise or async function and return promisesubject wrapTAsync<string>async { ... // return "value"; } ;
UniqueBehaviorSubject
;const subject = 1; // with default value console; // 1 subjectnext2;subjectnext2;subjectnext2;subjectnext3;subjectnext3; subject; /* value: 1 value: 2 value: 3 */
Testing
$ npm test
License
The MIT License