Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-observable

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-observable - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

lib/cjs/ActionsObservable.js

27

CHANGELOG.md

@@ -0,1 +1,28 @@

<a name="0.14.0"></a>
# [0.14.0](https://github.com/redux-observable/redux-observable/compare/v0.13.0...v0.14.0) (2017-03-02)
### Bug Fixes
* **typings:** Add custom epic overload to combineEpics ([#197](https://github.com/redux-observable/redux-observable/issues/197)) ([88c0bf9](https://github.com/redux-observable/redux-observable/commit/88c0bf9))
### Chores
* **rxjs:** update rxjs to v5 non-beta ([#191](https://github.com/redux-observable/redux-observable/issues/191)) ([857e8d0](https://github.com/redux-observable/redux-observable/commit/857e8d0))
### Features
* **build:** es modules ([#201](https://github.com/redux-observable/redux-observable/issues/201)) ([c4318ec](https://github.com/redux-observable/redux-observable/commit/c4318ec))
* **dependencies:** Added explicit dependencies option to createEpicMiddleware ([#193](https://github.com/redux-observable/redux-observable/issues/193)) ([7e2a479](https://github.com/redux-observable/redux-observable/commit/7e2a479)), closes [#163](https://github.com/redux-observable/redux-observable/issues/163)
### BREAKING CHANGES
* rxjs: RxJS v5 non-beta (e.g. 5.1.0) is now required. Upgrading from rxjs 5
beta to latest should be easy in most cases.
<a name="0.13.0"></a>

@@ -2,0 +29,0 @@ # [0.13.0](https://github.com/redux-observable/redux-observable/compare/v0.12.2...v0.13.0) (2017-01-20)

510

dist/redux-observable.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["ReduxObservable"] = factory(root["Rx"], root["Rx"], root["Rx"]["Observable"]["prototype"], root["Rx"]["Observable"]["prototype"], root["Rx"]["Observable"]["prototype"], root["Rx"]["Observable"], root["Rx"]["Observable"], root["Rx"]["Observable"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -25,5 +25,5 @@ /******/ // The module cache

/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };

@@ -35,3 +35,3 @@

/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ module.l = true;

@@ -49,2 +49,28 @@ /******/ // Return the exports of the module

/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__

@@ -54,3 +80,3 @@ /******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ return __webpack_require__(__webpack_require__.s = 12);
/******/ })

@@ -60,319 +86,329 @@ /************************************************************************/

/* 0 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createEpicMiddleware = __webpack_require__(4);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ActionsObservable = undefined;
Object.defineProperty(exports, 'createEpicMiddleware', {
enumerable: true,
get: function get() {
return _createEpicMiddleware.createEpicMiddleware;
}
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _ActionsObservable = __webpack_require__(1);
var _Observable2 = __webpack_require__(4);
Object.defineProperty(exports, 'ActionsObservable', {
enumerable: true,
get: function get() {
return _ActionsObservable.ActionsObservable;
}
});
var _of2 = __webpack_require__(11);
var _combineEpics = __webpack_require__(3);
var _from2 = __webpack_require__(9);
Object.defineProperty(exports, 'combineEpics', {
enumerable: true,
get: function get() {
return _combineEpics.combineEpics;
}
});
var _filter = __webpack_require__(6);
var _EPIC_END = __webpack_require__(2);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Object.defineProperty(exports, 'EPIC_END', {
enumerable: true,
get: function get() {
return _EPIC_END.EPIC_END;
}
});
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
'use strict';
var ActionsObservable = exports.ActionsObservable = function (_Observable) {
_inherits(ActionsObservable, _Observable);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ActionsObservable = undefined;
_createClass(ActionsObservable, null, [{
key: 'of',
value: function of() {
return new this(_of2.of.apply(undefined, arguments));
}
}, {
key: 'from',
value: function from(actions, scheduler) {
return new this((0, _from2.from)(actions, scheduler));
}
}]);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function ActionsObservable(actionsSubject) {
_classCallCheck(this, ActionsObservable);
var _Observable2 = __webpack_require__(5);
var _this = _possibleConstructorReturn(this, (ActionsObservable.__proto__ || Object.getPrototypeOf(ActionsObservable)).call(this));
var _of2 = __webpack_require__(12);
_this.source = actionsSubject;
return _this;
}
var _from2 = __webpack_require__(10);
_createClass(ActionsObservable, [{
key: 'lift',
value: function lift(operator) {
var observable = new ActionsObservable(this);
observable.operator = operator;
return observable;
}
}, {
key: 'ofType',
value: function ofType() {
for (var _len = arguments.length, keys = Array(_len), _key = 0; _key < _len; _key++) {
keys[_key] = arguments[_key];
}
var _filter = __webpack_require__(7);
return _filter.filter.call(this, function (_ref) {
var type = _ref.type;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var len = keys.length;
if (len === 1) {
return type === keys[0];
} else {
for (var i = 0; i < len; i++) {
if (keys[i] === type) {
return true;
}
}
}
return false;
});
}
}]);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
return ActionsObservable;
}(_Observable2.Observable);
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
var ActionsObservable = exports.ActionsObservable = function (_Observable) {
_inherits(ActionsObservable, _Observable);
"use strict";
_createClass(ActionsObservable, null, [{
key: 'of',
value: function of() {
return new this(_of2.of.apply(undefined, arguments));
}
}, {
key: 'from',
value: function from(actions, scheduler) {
return new this((0, _from2.from)(actions, scheduler));
}
}]);
function ActionsObservable(actionsSubject) {
_classCallCheck(this, ActionsObservable);
Object.defineProperty(exports, "__esModule", {
value: true
});
var EPIC_END = exports.EPIC_END = '@@redux-observable/EPIC_END';
var _this = _possibleConstructorReturn(this, (ActionsObservable.__proto__ || Object.getPrototypeOf(ActionsObservable)).call(this));
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
_this.source = actionsSubject;
return _this;
}
"use strict";
_createClass(ActionsObservable, [{
key: 'lift',
value: function lift(operator) {
var observable = new ActionsObservable(this);
observable.operator = operator;
return observable;
}
}, {
key: 'ofType',
value: function ofType() {
for (var _len = arguments.length, keys = Array(_len), _key = 0; _key < _len; _key++) {
keys[_key] = arguments[_key];
}
return _filter.filter.call(this, function (_ref) {
var type = _ref.type;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.combineEpics = undefined;
var len = keys.length;
if (len === 1) {
return type === keys[0];
} else {
for (var i = 0; i < len; i++) {
if (keys[i] === type) {
return true;
}
}
}
return false;
});
}
}]);
var _merge = __webpack_require__(10);
return ActionsObservable;
}(_Observable2.Observable);
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
/***/ },
/* 2 */
/***/ function(module, exports) {
/**
Merges all epics into a single one.
*/
var combineEpics = exports.combineEpics = function combineEpics() {
for (var _len = arguments.length, epics = Array(_len), _key = 0; _key < _len; _key++) {
epics[_key] = arguments[_key];
}
'use strict';
return function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
Object.defineProperty(exports, "__esModule", {
value: true
});
var EPIC_END = exports.EPIC_END = '@@redux-observable/EPIC_END';
return _merge.merge.apply(undefined, _toConsumableArray(epics.map(function (epic) {
var output$ = epic.apply(undefined, args);
if (!output$) {
throw new TypeError('combineEpics: one of the provided Epics "' + (epic.name || '<anonymous>') + '" does not return a stream. Double check you\'re not missing a return statement!');
}
return output$;
})));
};
};
/***/ },
/***/ }),
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.combineEpics = undefined;
var _merge = __webpack_require__(11);
Object.defineProperty(exports, "__esModule", {
value: true
});
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
/**
Merges all epics into a single one.
*/
var combineEpics = exports.combineEpics = function combineEpics() {
for (var _len = arguments.length, epics = Array(_len), _key = 0; _key < _len; _key++) {
epics[_key] = arguments[_key];
}
exports.createEpicMiddleware = createEpicMiddleware;
return function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var _Subject = __webpack_require__(5);
return _merge.merge.apply(undefined, _toConsumableArray(epics.map(function (epic) {
var output$ = epic.apply(undefined, args);
if (!output$) {
throw new TypeError('combineEpics: one of the provided Epics "' + (epic.name || '<anonymous>') + '" does not return a stream. Double check you\'re not missing a return statement!');
}
return output$;
})));
};
};
var _map = __webpack_require__(7);
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
var _switchMap = __webpack_require__(8);
'use strict';
var _ActionsObservable = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createEpicMiddleware = createEpicMiddleware;
var _EPIC_END = __webpack_require__(1);
var _Subject = __webpack_require__(6);
var defaultAdapter = {
input: function input(action$) {
return action$;
},
output: function output(action$) {
return action$;
}
};
var _map = __webpack_require__(8);
var defaultOptions = {
adapter: defaultAdapter
};
var _switchMap = __webpack_require__(9);
function createEpicMiddleware(epic) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
var _ActionsObservable = __webpack_require__(1);
if (typeof epic !== 'function') {
throw new TypeError('You must provide a root Epic to createEpicMiddleware');
}
var _EPIC_END = __webpack_require__(2);
// even though we used default param, we need to merge the defaults
// inside the options object as well in case they declare only some
options = _extends({}, defaultOptions, options);
var input$ = new _Subject.Subject();
var action$ = options.adapter.input(new _ActionsObservable.ActionsObservable(input$));
var epic$ = new _Subject.Subject();
var store = void 0;
var defaultAdapter = {
input: function input(action$) {
return action$;
},
output: function output(action$) {
return action$;
}
};
var epicMiddleware = function epicMiddleware(_store) {
store = _store;
var defaultOptions = {
adapter: defaultAdapter
};
return function (next) {
var _context;
function createEpicMiddleware(epic) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions,
_ref$adapter = _ref.adapter,
adapter = _ref$adapter === undefined ? defaultAdapter : _ref$adapter;
(_context = _map.map.call(epic$, function (epic) {
var output$ = 'dependencies' in options ? epic(action$, store, options.dependencies) : epic(action$, store);
if (typeof epic !== 'function') {
throw new TypeError('You must provide a root Epic to createEpicMiddleware');
}
if (!output$) {
throw new TypeError('Your root Epic "' + (epic.name || '<anonymous>') + '" does not return a stream. Double check you\'re not missing a return statement!');
}
var input$ = new _Subject.Subject();
var action$ = adapter.input(new _ActionsObservable.ActionsObservable(input$));
var epic$ = new _Subject.Subject();
var store = void 0;
return output$;
}), _switchMap.switchMap).call(_context, function (output$) {
return options.adapter.output(output$);
}).subscribe(store.dispatch);
var epicMiddleware = function epicMiddleware(_store) {
store = _store;
// Setup initial root epic
epic$.next(epic);
return function (next) {
var _context;
return function (action) {
var result = next(action);
input$.next(action);
return result;
};
};
};
(_context = _map.map.call(epic$, function (epic) {
var output$ = epic(action$, store);
if (!output$) {
throw new TypeError('Your root Epic "' + (epic.name || '<anonymous>') + '" does not return a stream. Double check you\'re not missing a return statement!');
}
return output$;
}), _switchMap.switchMap).call(_context, function (output$) {
return adapter.output(output$);
}).subscribe(store.dispatch);
epicMiddleware.replaceEpic = function (epic) {
// gives the previous root Epic a last chance
// to do some clean up
store.dispatch({ type: _EPIC_END.EPIC_END });
// switches to the new root Epic, synchronously terminating
// the previous one
epic$.next(epic);
};
// Setup initial root epic
epic$.next(epic);
return epicMiddleware;
}
return function (action) {
var result = next(action);
input$.next(action);
return result;
};
};
};
/***/ }),
/* 4 */
/***/ (function(module, exports) {
epicMiddleware.replaceEpic = function (epic) {
// gives the previous root Epic a last chance
// to do some clean up
store.dispatch({ type: _EPIC_END.EPIC_END });
// switches to the new root Epic, synchronously terminating
// the previous one
epic$.next(epic);
};
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
return epicMiddleware;
}
/***/ },
/***/ }),
/* 5 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/***/ }),
/* 6 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_6__;
module.exports = __WEBPACK_EXTERNAL_MODULE_6__;
/***/ },
/***/ }),
/* 7 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
/***/ },
/***/ }),
/* 8 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_8__;
module.exports = __WEBPACK_EXTERNAL_MODULE_8__;
/***/ },
/***/ }),
/* 9 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
/***/ },
/***/ }),
/* 10 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_10__;
module.exports = __WEBPACK_EXTERNAL_MODULE_10__;
/***/ },
/***/ }),
/* 11 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
/***/ },
/***/ }),
/* 12 */
/***/ function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
module.exports = __WEBPACK_EXTERNAL_MODULE_12__;
"use strict";
/***/ }
/******/ ])
Object.defineProperty(exports, "__esModule", {
value: true
});
;
var _createEpicMiddleware = __webpack_require__(3);
Object.defineProperty(exports, 'createEpicMiddleware', {
enumerable: true,
get: function get() {
return _createEpicMiddleware.createEpicMiddleware;
}
});
var _ActionsObservable = __webpack_require__(0);
Object.defineProperty(exports, 'ActionsObservable', {
enumerable: true,
get: function get() {
return _ActionsObservable.ActionsObservable;
}
});
var _combineEpics = __webpack_require__(2);
Object.defineProperty(exports, 'combineEpics', {
enumerable: true,
get: function get() {
return _combineEpics.combineEpics;
}
});
var _EPIC_END = __webpack_require__(1);
Object.defineProperty(exports, 'EPIC_END', {
enumerable: true,
get: function get() {
return _EPIC_END.EPIC_END;
}
});
/***/ })
/******/ ]);
});

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rxjs/Observable"),require("rxjs/Subject"),require("rxjs/operator/filter"),require("rxjs/operator/map"),require("rxjs/operator/switchMap"),require("rxjs/observable/from"),require("rxjs/observable/merge"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["rxjs/Observable","rxjs/Subject","rxjs/operator/filter","rxjs/operator/map","rxjs/operator/switchMap","rxjs/observable/from","rxjs/observable/merge","rxjs/observable/of"],r):"object"==typeof exports?exports.ReduxObservable=r(require("rxjs/Observable"),require("rxjs/Subject"),require("rxjs/operator/filter"),require("rxjs/operator/map"),require("rxjs/operator/switchMap"),require("rxjs/observable/from"),require("rxjs/observable/merge"),require("rxjs/observable/of")):e.ReduxObservable=r(e.Rx,e.Rx,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable,e.Rx.Observable,e.Rx.Observable)}(this,function(e,r,t,o,n,i,u,a){return function(e){function r(o){if(t[o])return t[o].exports;var n=t[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(4);Object.defineProperty(r,"createEpicMiddleware",{enumerable:!0,get:function(){return o.createEpicMiddleware}});var n=t(1);Object.defineProperty(r,"ActionsObservable",{enumerable:!0,get:function(){return n.ActionsObservable}});var i=t(3);Object.defineProperty(r,"combineEpics",{enumerable:!0,get:function(){return i.combineEpics}});var u=t(2);Object.defineProperty(r,"EPIC_END",{enumerable:!0,get:function(){return u.EPIC_END}})},function(e,r,t){"use strict";function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function i(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0}),r.ActionsObservable=void 0;var u=function(){function e(e,r){for(var t=0;r.length>t;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(r,t,o){return t&&e(r.prototype,t),o&&e(r,o),r}}(),a=t(5),s=t(12),c=t(10),f=t(7);r.ActionsObservable=function(e){function r(e){o(this,r);var t=n(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.source=e,t}return i(r,e),u(r,null,[{key:"of",value:function(){return new this(s.of.apply(void 0,arguments))}},{key:"from",value:function(e,r){return new this((0,c.from)(e,r))}}]),u(r,[{key:"lift",value:function(e){var t=new r(this);return t.operator=e,t}},{key:"ofType",value:function(){for(var e=arguments.length,r=Array(e),t=0;e>t;t++)r[t]=arguments[t];return f.filter.call(this,function(e){var t=e.type,o=r.length;if(1===o)return t===r[0];for(var n=0;o>n;n++)if(r[n]===t)return!0;return!1})}}]),r}(a.Observable)},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.EPIC_END="@@redux-observable/EPIC_END"},function(e,r,t){"use strict";function o(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);e.length>r;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.combineEpics=void 0;var n=t(11);r.combineEpics=function(){for(var e=arguments.length,r=Array(e),t=0;e>t;t++)r[t]=arguments[t];return function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return n.merge.apply(void 0,o(r.map(function(e){var r=e.apply(void 0,t);if(!r)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return r})))}}},function(e,r,t){"use strict";function o(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f,t=r.adapter,o=void 0===t?c:t;if("function"!=typeof e)throw new TypeError("You must provide a root Epic to createEpicMiddleware");var p=new n.Subject,l=o.input(new a.ActionsObservable(p)),b=new n.Subject,v=void 0,d=function(r){return v=r,function(r){var t;return(t=i.map.call(b,function(e){var r=e(l,v);if(!r)throw new TypeError('Your root Epic "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return r}),u.switchMap).call(t,function(e){return o.output(e)}).subscribe(v.dispatch),b.next(e),function(e){var t=r(e);return p.next(e),t}}};return d.replaceEpic=function(e){v.dispatch({type:s.EPIC_END}),b.next(e)},d}Object.defineProperty(r,"__esModule",{value:!0}),r.createEpicMiddleware=o;var n=t(6),i=t(8),u=t(9),a=t(1),s=t(2),c={input:function(e){return e},output:function(e){return e}},f={adapter:c}},function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r){e.exports=t},function(e,r){e.exports=o},function(e,r){e.exports=n},function(e,r){e.exports=i},function(e,r){e.exports=u},function(e,r){e.exports=a}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rxjs/Observable"),require("rxjs/Subject"),require("rxjs/operator/filter"),require("rxjs/operator/map"),require("rxjs/operator/switchMap"),require("rxjs/observable/from"),require("rxjs/observable/merge"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["rxjs/Observable","rxjs/Subject","rxjs/operator/filter","rxjs/operator/map","rxjs/operator/switchMap","rxjs/observable/from","rxjs/observable/merge","rxjs/observable/of"],r):"object"==typeof exports?exports.ReduxObservable=r(require("rxjs/Observable"),require("rxjs/Subject"),require("rxjs/operator/filter"),require("rxjs/operator/map"),require("rxjs/operator/switchMap"),require("rxjs/observable/from"),require("rxjs/observable/merge"),require("rxjs/observable/of")):e.ReduxObservable=r(e.Rx,e.Rx,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable,e.Rx.Observable,e.Rx.Observable)}(this,function(e,r,t,n,o,i,u,a){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var t={};return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=12)}([function(e,r,t){"use strict";function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function o(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function i(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0}),r.ActionsObservable=void 0;var u=function(){function e(e,r){for(var t=0;r.length>t;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),a=t(4),c=t(11),s=t(9),f=t(6);r.ActionsObservable=function(e){function r(e){n(this,r);var t=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.source=e,t}return i(r,e),u(r,null,[{key:"of",value:function(){return new this(c.of.apply(void 0,arguments))}},{key:"from",value:function(e,r){return new this((0,s.from)(e,r))}}]),u(r,[{key:"lift",value:function(e){var t=new r(this);return t.operator=e,t}},{key:"ofType",value:function(){for(var e=arguments.length,r=Array(e),t=0;e>t;t++)r[t]=arguments[t];return f.filter.call(this,function(e){var t=e.type,n=r.length;if(1===n)return t===r[0];for(var o=0;n>o;o++)if(r[o]===t)return!0;return!1})}}]),r}(a.Observable)},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.EPIC_END="@@redux-observable/EPIC_END"},function(e,r,t){"use strict";function n(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);e.length>r;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.combineEpics=void 0;var o=t(10);r.combineEpics=function(){for(var e=arguments.length,r=Array(e),t=0;e>t;t++)r[t]=arguments[t];return function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return o.merge.apply(void 0,n(r.map(function(e){var r=e.apply(void 0,t);if(!r)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return r})))}}},function(e,r,t){"use strict";function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if("function"!=typeof e)throw new TypeError("You must provide a root Epic to createEpicMiddleware");r=o({},p,r);var t=new i.Subject,n=r.adapter.input(new c.ActionsObservable(t)),f=new i.Subject,l=void 0,b=function(o){return l=o,function(o){var i;return(i=u.map.call(f,function(e){var t="dependencies"in r?e(n,l,r.dependencies):e(n,l);if(!t)throw new TypeError('Your root Epic "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return t}),a.switchMap).call(i,function(e){return r.adapter.output(e)}).subscribe(l.dispatch),f.next(e),function(e){var r=o(e);return t.next(e),r}}};return b.replaceEpic=function(e){l.dispatch({type:s.EPIC_END}),f.next(e)},b}Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};r.createEpicMiddleware=n;var i=t(5),u=t(7),a=t(8),c=t(0),s=t(1),f={input:function(e){return e},output:function(e){return e}},p={adapter:f}},function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r){e.exports=t},function(e,r){e.exports=n},function(e,r){e.exports=o},function(e,r){e.exports=i},function(e,r){e.exports=u},function(e,r){e.exports=a},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(3);Object.defineProperty(r,"createEpicMiddleware",{enumerable:!0,get:function(){return n.createEpicMiddleware}});var o=t(0);Object.defineProperty(r,"ActionsObservable",{enumerable:!0,get:function(){return o.ActionsObservable}});var i=t(2);Object.defineProperty(r,"combineEpics",{enumerable:!0,get:function(){return i.combineEpics}});var u=t(1);Object.defineProperty(r,"EPIC_END",{enumerable:!0,get:function(){return u.EPIC_END}})}])});

@@ -38,3 +38,3 @@ import { Middleware, MiddlewareAPI } from 'redux';

interface Adapter {
interface Adapter {
input: (input$: Observable<any>) => any;

@@ -51,1 +51,2 @@ output: (output$: any) => Observable<any>;

export declare function combineEpics<T, S>(...epics: Epic<T, S>[]): Epic<T, S>;
export declare function combineEpics<E>(...epics: E[]): E;
{
"name": "redux-observable",
"version": "0.13.0",
"version": "0.14.0",
"description": "RxJS based middleware for Redux. Compose and cancel async actions and more.",
"main": "lib/index.js",
"module": "lib/es/index.js",
"main": "lib/cjs/index.js",
"scripts": {
"lint": "eslint src && eslint test",
"build": "npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:cjs": "babel src -d lib",
"build": "npm run build:es && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es": "gulp build:es",
"build:cjs": "babel src -d lib/cjs",
"build:umd": "cross-env NODE_ENV=development webpack src/index.js dist/redux-observable.js",

@@ -65,3 +67,3 @@ "build:umd:min": "cross-env NODE_ENV=production webpack src/index.js dist/redux-observable.min.js",

"redux": "3.*",
"rxjs": "^5.0.0-beta.10"
"rxjs": "^5.0.0"
},

@@ -90,5 +92,7 @@ "devDependencies": {

"gitbook-plugin-edit-link": "^2.0.2",
"gitbook-plugin-github": "^2.0.0",
"gitbook-plugin-github": "^3.0.0",
"gitbook-plugin-prism": "^2.0.1",
"gitbook-plugin-theme-default": "^1.0.5",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"json-server": "^0.9.0",

@@ -98,8 +102,8 @@ "mocha": "^3.0.1",

"rimraf": "^2.5.4",
"rxjs": "^5.0.0-beta.10",
"rxjs": "^5.0.0",
"sinon": "1.17.7",
"typescript": "^2.1.4",
"webpack": "^1.13.1",
"webpack-rxjs-externals": "~0.0.4"
"webpack": "^2.2.1",
"webpack-rxjs-externals": "~1.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc