monkey patch for https://github.com/Reactive-Extensions/RxJS
npm i monkey-patches-rx --save --save-exact
var options = {/* ... */};
Rx = require('rx');
require('monkey-patches-rx')(Rx, options);
with this option you can enable all patch.
options = {all: true};
// setup
with this option following methods will be added to Observables.
isTruthty
isFalsey
isDefined
isNull
isUndefined
isString
options = {typeFilter: true};
// setup
var obj$ = Rx.Observable.from([0, 1, null, undefined, false, true, '', {}, [], 'Hi']);
obj$.isTruthty(); // 1 true {} [] 'Hi'
obj$.isFalsey(); // 0 null undefined false ''
obj$.isDefined(); // 0 1 null false true '' {} [] 'Hi'
obj$.isNull(); // null
obj$.isUndefined(); // undefined
obj$.isString(); // '' 'Hi'
I test this package with [email protected]
and [email protected]
No. this is only 🐵 patch. so every time install this package with --save-exact
option.