Comparing version 2.0.0 to 2.0.1
@@ -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; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20231
291
73
0