Bump to v3.4.0.

This commit is contained in:
jdalton
2015-02-28 22:12:58 -08:00
parent 1e05116bcb
commit d01a1e4ef3
50 changed files with 477 additions and 317 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;
};