raptor-async
Advanced tools
Comparing version
@@ -13,3 +13,3 @@ // NOTE: Be careful if these numeric values are changed | ||
function DataHolder(options) { | ||
function AsyncValue(options) { | ||
@@ -120,3 +120,3 @@ /** | ||
DataHolder.prototype = { | ||
AsyncValue.prototype = { | ||
@@ -236,3 +236,3 @@ /** | ||
this._state = this._loader ? STATE_INITIAL : STATE_REJECTED; | ||
// always notify callbacks regardless of whether or not we return to the initial state | ||
@@ -284,6 +284,6 @@ notifyCallbacks(this, err, null); | ||
this._state = STATE_INITIAL; | ||
// reset error value | ||
this.error = undefined; | ||
// reset data value | ||
@@ -297,2 +297,6 @@ this.data = undefined; | ||
module.exports = DataHolder; | ||
AsyncValue.create = function(config) { | ||
return new AsyncValue(config); | ||
}; | ||
module.exports = AsyncValue; |
@@ -24,3 +24,3 @@ { | ||
}, | ||
"version": "1.1.0" | ||
"version": "1.1.1" | ||
} |
34924
0.15%661
0.46%