reshow-flux-base
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports["default"] = void 0; | ||
@@ -18,8 +18,8 @@ var _classCallCheck2 = _interopRequireDefault(require("reshow-runtime/helpers/classCallCheck")); | ||
(0, _classCallCheck2.default)(this, Dispatcher); | ||
(0, _defineProperty2.default)(this, "cbs", []); | ||
(0, _defineProperty2.default)(this, "register", function (cb) { | ||
(0, _classCallCheck2["default"])(this, Dispatcher); | ||
(0, _defineProperty2["default"])(this, "cbs", []); | ||
(0, _defineProperty2["default"])(this, "register", function (cb) { | ||
return _this.cbs.push(cb); | ||
}); | ||
(0, _defineProperty2.default)(this, "dispatch", function (payload, params) { | ||
(0, _defineProperty2["default"])(this, "dispatch", function (payload, params) { | ||
if (!payload) { | ||
@@ -47,3 +47,3 @@ payload = {}; | ||
var _default = Dispatcher; | ||
exports.default = _default; | ||
exports["default"] = _default; | ||
module.exports = exports.default; |
@@ -13,3 +13,3 @@ "use strict"; | ||
get: function get() { | ||
return _Store.default; | ||
return _Store["default"]; | ||
} | ||
@@ -26,3 +26,3 @@ }); | ||
get: function get() { | ||
return _Dispatcher.default; | ||
return _Dispatcher["default"]; | ||
} | ||
@@ -29,0 +29,0 @@ }); |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports["default"] = void 0; | ||
@@ -33,3 +33,3 @@ var type = function type(all) { | ||
var _default = mitt; | ||
exports.default = _default; | ||
exports["default"] = _default; | ||
module.exports = exports.default; |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.CHANGE = exports.default = void 0; | ||
exports.CHANGE = exports["default"] = void 0; | ||
@@ -25,3 +25,3 @@ var _classCallCheck2 = _interopRequireDefault(require("reshow-runtime/helpers/classCallCheck")); | ||
function () { | ||
(0, _createClass2.default)(Store, [{ | ||
(0, _createClass2["default"])(Store, [{ | ||
key: "reduce", | ||
@@ -46,7 +46,4 @@ value: function reduce() { | ||
(0, _classCallCheck2.default)(this, Store); | ||
(0, _defineProperty2.default)(this, "getState", function () { | ||
return _this._state; | ||
}); | ||
(0, _defineProperty2.default)(this, "__invokeOnDispatch", function (action) { | ||
(0, _classCallCheck2["default"])(this, Store); | ||
(0, _defineProperty2["default"])(this, "__invokeOnDispatch", function (action) { | ||
var startingState = _this._state; | ||
@@ -73,9 +70,9 @@ | ||
}); | ||
(0, _defineProperty2.default)(this, "emit", function (e) { | ||
(0, _defineProperty2["default"])(this, "emit", function (e) { | ||
return _this.mitt.emit(e); | ||
}); | ||
(0, _defineProperty2.default)(this, "addListener", function (listener, e) { | ||
(0, _defineProperty2["default"])(this, "addListener", function (listener, e) { | ||
return _this.mitt.on(e, listener); | ||
}); | ||
(0, _defineProperty2.default)(this, "removeListener", function (listener, e) { | ||
(0, _defineProperty2["default"])(this, "removeListener", function (listener, e) { | ||
return _this.mitt.off(e, listener); | ||
@@ -87,9 +84,14 @@ }); | ||
(0, _createClass2.default)(Store, [{ | ||
(0, _createClass2["default"])(Store, [{ | ||
key: "reset", | ||
value: function reset() { | ||
this.mitt = new _mitt.default(); | ||
this.mitt = new _mitt["default"](); | ||
this.nextEmits = []; | ||
return this.getInitialState(); | ||
} | ||
}, { | ||
key: "getState", | ||
value: function getState() { | ||
return this._state; | ||
} | ||
/* Following not extendable */ | ||
@@ -102,2 +104,2 @@ | ||
var _default = Store; | ||
exports.default = _default; | ||
exports["default"] = _default; |
@@ -32,6 +32,2 @@ import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck"; | ||
_defineProperty(this, "getState", function () { | ||
return _this._state; | ||
}); | ||
_defineProperty(this, "__invokeOnDispatch", function (action) { | ||
@@ -83,2 +79,7 @@ var startingState = _this._state; | ||
} | ||
}, { | ||
key: "getState", | ||
value: function getState() { | ||
return this._state; | ||
} | ||
/* Following not extendable */ | ||
@@ -85,0 +86,0 @@ |
{ | ||
"name": "reshow-flux-base", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Pure flux dispatch mechanism", | ||
@@ -5,0 +5,0 @@ "main": "./build/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9902
288