Comparing version 0.2.9 to 0.2.10
{ | ||
"name": "dispatchr", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "A Flux dispatcher for applications that run on the server and the client.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -181,3 +181,3 @@ # Dispatchr | ||
`require('dispatchr/utils/BaseStore')` provides a base store class for extending. Provides `emitChange`, `addChangeListener`, and `removeChangeListener` functions. Example: | ||
`require('dispatchr/utils/BaseStore')` provides a base store class for extending. Provides `getContext`, `emitChange`, `addChangeListener`, and `removeChangeListener` functions. Example: | ||
@@ -195,3 +195,3 @@ ```js | ||
}; | ||
MyStore.prototype.getFoo = function () { ... } | ||
MyStore.prototype.getFoo = function () { var context = this.getContext(), ... } | ||
module.exports = MyStore; | ||
@@ -198,0 +198,0 @@ ``` |
@@ -7,5 +7,5 @@ /** | ||
var util = require('util'), | ||
EventEmitter = require('events').EventEmitter, | ||
CHANGE_EVENT = 'change'; | ||
var util = require('util'); | ||
var EventEmitter = require('events').EventEmitter; | ||
var CHANGE_EVENT = 'change'; | ||
@@ -28,2 +28,11 @@ /** | ||
/** | ||
* Convenience method for getting the store context object. | ||
* @method getContext | ||
* @return {Object} Returns the store context object. | ||
*/ | ||
BaseStore.prototype.getContext = function getContext() { | ||
return this.dispatcher.getContext(); | ||
}; | ||
/** | ||
* Add a listener for the change event | ||
@@ -30,0 +39,0 @@ * @method addChangeListener |
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
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
68752
22
438
0