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

flux

Package Overview
Dependencies
Maintainers
1
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 2.0.0 to 2.0.1

20

lib/Dispatcher.js

@@ -13,2 +13,4 @@ /*

"use strict";
var invariant = require('./invariant');

@@ -111,3 +113,3 @@

function Dispatcher() {"use strict";
function Dispatcher() {
this.$Dispatcher_callbacks = {};

@@ -127,3 +129,3 @@ this.$Dispatcher_isPending = {};

*/
Dispatcher.prototype.register=function(callback) {"use strict";
Dispatcher.prototype.register=function(callback) {
var id = _prefix + _lastID++;

@@ -139,3 +141,3 @@ this.$Dispatcher_callbacks[id] = callback;

*/
Dispatcher.prototype.unregister=function(id) {"use strict";
Dispatcher.prototype.unregister=function(id) {
invariant(

@@ -156,3 +158,3 @@ this.$Dispatcher_callbacks[id],

*/
Dispatcher.prototype.waitFor=function(ids) {"use strict";
Dispatcher.prototype.waitFor=function(ids) {
invariant(

@@ -187,3 +189,3 @@ this.$Dispatcher_isDispatching,

*/
Dispatcher.prototype.dispatch=function(payload) {"use strict";
Dispatcher.prototype.dispatch=function(payload) {
invariant(

@@ -211,3 +213,3 @@ !this.$Dispatcher_isDispatching,

*/
Dispatcher.prototype.isDispatching=function() {"use strict";
Dispatcher.prototype.isDispatching=function() {
return this.$Dispatcher_isDispatching;

@@ -223,3 +225,3 @@ };

*/
Dispatcher.prototype.$Dispatcher_invokeCallback=function(id) {"use strict";
Dispatcher.prototype.$Dispatcher_invokeCallback=function(id) {
this.$Dispatcher_isPending[id] = true;

@@ -236,3 +238,3 @@ this.$Dispatcher_callbacks[id](this.$Dispatcher_pendingPayload);

*/
Dispatcher.prototype.$Dispatcher_startDispatching=function(payload) {"use strict";
Dispatcher.prototype.$Dispatcher_startDispatching=function(payload) {
for (var id in this.$Dispatcher_callbacks) {

@@ -251,3 +253,3 @@ this.$Dispatcher_isPending[id] = false;

*/
Dispatcher.prototype.$Dispatcher_stopDispatching=function() {"use strict";
Dispatcher.prototype.$Dispatcher_stopDispatching=function() {
this.$Dispatcher_pendingPayload = null;

@@ -254,0 +256,0 @@ this.$Dispatcher_isDispatching = false;

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

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

@@ -25,8 +25,17 @@ # Flux

## Building and Installing Flux
## Installing Flux
Flux is available as a [npm module](https://www.npmjs.org/package/flux), so you can add it to your package.json file or run `npm install flux`. The dispatcher will be available as `Flux.Dispatcher` and can be required like this:
```javascript
var Dispatcher = require('flux').Dispatcher;
```
## Building Flux from a Cloned Repo
Clone the repo and navigate into the resulting `flux` directory. Then run `npm install`.
This will run [Gulp](http://gulpjs.com/)-based build tasks automatically and produce the file Flux.js, which you can then require as a module.
The dispatcher will be available as Flux.Dispatcher. You could require it like so:
You could then require the Dispatcher like so:
```javascript

@@ -33,0 +42,0 @@ var Dispatcher = require('path/to/this/directory/Flux').Dispatcher;

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