Bump to v3.4.0.

This commit is contained in:
jdalton
2015-02-28 23:03:50 -08:00
parent cc16e113c2
commit 4881dda9d1
49 changed files with 868 additions and 588 deletions

View File

@@ -61,13 +61,14 @@ function memoize(func, resolver) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var cache = memoized.cache,
key = resolver ? resolver.apply(this, arguments) : arguments[0];
var args = arguments,
cache = memoized.cache,
key = resolver ? resolver.apply(this, args) : args[0];
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, arguments);
var result = func.apply(this, args);
cache.set(key, result);
return result;
};