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

reshow-flux-base

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshow-flux-base - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

12

build/cjs/Dispatcher.js

@@ -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",

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