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

flux

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flux - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

5

CHANGELOG.md
# Changelog
### 3.1.0
* `Dispatcher`: Methods `register` and `unregister` can once again be called in
the middle of a dispatch.
### 3.0.0

@@ -4,0 +9,0 @@

4

dist/Flux.js
/**
* Flux v3.0.0
* Flux v3.1.0
*/

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

Dispatcher.prototype.register = function register(callback) {
!!this._isDispatching ? true ? invariant(false, 'Dispatcher.register(...): Cannot register in the middle of a dispatch.') : invariant(false) : undefined;
var id = _prefix + this._lastID++;

@@ -221,3 +220,2 @@ this._callbacks[id] = callback;

Dispatcher.prototype.unregister = function unregister(id) {
!!this._isDispatching ? true ? invariant(false, 'Dispatcher.unregister(...): Cannot unregister in the middle of a dispatch.') : invariant(false) : undefined;
!this._callbacks[id] ? true ? invariant(false, 'Dispatcher.unregister(...): `%s` does not map to a registered callback.', id) : invariant(false) : undefined;

@@ -224,0 +222,0 @@ delete this._callbacks[id];

/**
* Flux v3.0.0
* Flux v3.1.0
*

@@ -10,2 +10,2 @@ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

*/
!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Flux=t():i.Flux=t()}(this,function(){return function(i){function t(s){if(n[s])return n[s].exports;var e=n[s]={exports:{},id:s,loaded:!1};return i[s].call(e.exports,e,e.exports,t),e.loaded=!0,e.exports}var n={};return t.m=i,t.c=n,t.p="",t(0)}([function(i,t,n){"use strict";i.exports.Dispatcher=n(1)},function(i,t,n){"use strict";function s(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}var e,o,a;t.__esModule=!0,e=n(2),o="ID_",a=function(){function i(){s(this,i),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return i.prototype.register=function(i){this._isDispatching?e(!1):void 0;var t=o+this._lastID++;return this._callbacks[t]=i,t},i.prototype.unregister=function(i){this._isDispatching?e(!1):void 0,this._callbacks[i]?void 0:e(!1),delete this._callbacks[i]},i.prototype.waitFor=function(i){var t,n;for(this._isDispatching?void 0:e(!1),t=0;t<i.length;t++)n=i[t],this._isPending[n]?this._isHandled[n]?void 0:e(!1):(this._callbacks[n]?void 0:e(!1),this._invokeCallback(n))},i.prototype.dispatch=function(i){this._isDispatching?e(!1):void 0,this._startDispatching(i);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},i.prototype.isDispatching=function(){return this._isDispatching},i.prototype._invokeCallback=function(i){this._isPending[i]=!0,this._callbacks[i](this._pendingPayload),this._isHandled[i]=!0},i.prototype._startDispatching=function(i){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=i,this._isDispatching=!0},i.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},i}(),i.exports=a},function(i,t,n){"use strict";function s(i,t,n,s,e,o,a,r){var c,p,h;if(!i)throw void 0===t?c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(p=[n,s,e,o,a,r],h=0,c=new Error(t.replace(/%s/g,function(){return p[h++]})),c.name="Invariant Violation"),c.framesToPop=1,c}i.exports=s}])});
!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Flux=t():i.Flux=t()}(this,function(){return function(i){function t(s){if(n[s])return n[s].exports;var e=n[s]={exports:{},id:s,loaded:!1};return i[s].call(e.exports,e,e.exports,t),e.loaded=!0,e.exports}var n={};return t.m=i,t.c=n,t.p="",t(0)}([function(i,t,n){"use strict";i.exports.Dispatcher=n(1)},function(i,t,n){"use strict";function s(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}var e,o,a;t.__esModule=!0,e=n(2),o="ID_",a=function(){function i(){s(this,i),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return i.prototype.register=function(i){var t=o+this._lastID++;return this._callbacks[t]=i,t},i.prototype.unregister=function(i){this._callbacks[i]?void 0:e(!1),delete this._callbacks[i]},i.prototype.waitFor=function(i){var t,n;for(this._isDispatching?void 0:e(!1),t=0;t<i.length;t++)n=i[t],this._isPending[n]?this._isHandled[n]?void 0:e(!1):(this._callbacks[n]?void 0:e(!1),this._invokeCallback(n))},i.prototype.dispatch=function(i){this._isDispatching?e(!1):void 0,this._startDispatching(i);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},i.prototype.isDispatching=function(){return this._isDispatching},i.prototype._invokeCallback=function(i){this._isPending[i]=!0,this._callbacks[i](this._pendingPayload),this._isHandled[i]=!0},i.prototype._startDispatching=function(i){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=i,this._isDispatching=!0},i.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},i}(),i.exports=a},function(i,t,n){"use strict";function s(i,t,n,s,e,o,a,r){var c,p,l;if(!i)throw void 0===t?c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(p=[n,s,e,o,a,r],l=0,c=new Error(t.replace(/%s/g,function(){return p[l++]})),c.name="Invariant Violation"),c.framesToPop=1,c}i.exports=s}])});
/**
* Flux v3.0.0
* Flux v3.1.0
*

@@ -4,0 +4,0 @@ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

@@ -129,3 +129,2 @@ /**

Dispatcher.prototype.register = function register(callback) {
!!this._isDispatching ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Dispatcher.register(...): Cannot register in the middle of a dispatch.') : invariant(false) : undefined;
var id = _prefix + this._lastID++;

@@ -141,3 +140,2 @@ this._callbacks[id] = callback;

Dispatcher.prototype.unregister = function unregister(id) {
!!this._isDispatching ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Dispatcher.unregister(...): Cannot unregister in the middle of a dispatch.') : invariant(false) : undefined;
!this._callbacks[id] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Dispatcher.unregister(...): `%s` does not map to a registered callback.', id) : invariant(false) : undefined;

@@ -144,0 +142,0 @@ delete this._callbacks[id];

{
"name": "flux",
"version": "3.0.0",
"version": "3.1.0",
"description": "An application architecture based on a unidirectional data flow",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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