mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Remove arguments references where possible.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user