Codacy style changes for test files
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
const memoize = fn => {
|
||||
const cache = new Map();
|
||||
const cached = function(val) {
|
||||
return cache.has(val) ? cache.get(val) : cache.set(val, fn.call(this, val)) && cache.get(val);
|
||||
};
|
||||
cached.cache = cache;
|
||||
return cached;
|
||||
const cache = new Map();
|
||||
const cached = function(val) {
|
||||
return cache.has(val) ? cache.get(val) : cache.set(val, fn.call(this, val)) && cache.get(val);
|
||||
};
|
||||
cached.cache = cache;
|
||||
return cached;
|
||||
};
|
||||
|
||||
module.exports = memoize;
|
||||
Reference in New Issue
Block a user