Remove arguments references where possible.

This commit is contained in:
John-David Dalton
2017-01-09 18:30:38 -08:00
parent f2c49500ee
commit 627bfe6bfa
5 changed files with 7 additions and 33 deletions

View File

@@ -50,8 +50,8 @@ function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
const memoized = function() {
const args = arguments, key = resolver ? resolver.apply(this, args) : args[0];
const memoized = function(...args) {
const key = resolver ? resolver.apply(this, args) : args[0];
const cache = memoized.cache;
if (cache.has(key)) {