Comparing version 0.1.0 to 0.1.1
@@ -94,3 +94,3 @@ (function() { | ||
callback = function() { | ||
var err, fn, functions, result, _j, _len, _results; | ||
var err, fn, result, _j, _len, _ref; | ||
err = arguments[0], result = 2 <= arguments.length ? __slice.call(arguments, 1) : []; | ||
@@ -100,10 +100,8 @@ if (!err) { | ||
} | ||
functions = _this._queue[hash].slice(0); | ||
delete _this._queue[hash]; | ||
_results = []; | ||
for (_j = 0, _len = functions.length; _j < _len; _j++) { | ||
fn = functions[_j]; | ||
_results.push(fn.apply(null, [err].concat(result))); | ||
_ref = _this._queue[hash]; | ||
for (_j = 0, _len = _ref.length; _j < _len; _j++) { | ||
fn = _ref[_j]; | ||
fn.apply(null, [err].concat(result)); | ||
} | ||
return _results; | ||
return delete _this._queue[hash]; | ||
}; | ||
@@ -165,3 +163,3 @@ return this._populate.apply(null, args.concat([callback])); | ||
Goldfish.prototype._isQueued = function(hash) { | ||
return Object.hasOwnProperty.call(this._queue, hash); | ||
return Object.prototype.hasOwnProperty.call(this._queue, hash); | ||
}; | ||
@@ -168,0 +166,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Evented in-memory cache", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -20,4 +20,2 @@ Goldfish | ||
[![endorse](http://api.coderwall.com/supershabam/endorsecount.png)](http://coderwall.com/supershabam) | ||
Options | ||
@@ -73,3 +71,3 @@ ======= | ||
**get#hit** O(1) | ||
**get#miss** O(1) + Populate() | ||
**get#miss** O(1) + Populate() | ||
**clear** O(n) | ||
@@ -83,4 +81,4 @@ | ||
Complete disregard for the previous api. Don't blindly update. | ||
Complete disregard for the previous api. Don't blindly update. | ||
Smaller, simpler api. | ||
Sorry, the diff of this file is not supported yet
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
0
22175
199
82