mirror of
https://github.com/BreizhHardware/memoizee.git
synced 2026-03-18 21:40:27 +01:00
-- whitespace
This commit is contained in:
@@ -21,9 +21,7 @@ module.exports = require('./_base')(function (conf, length) {
|
||||
var id = '', i;
|
||||
if (length) {
|
||||
id += args[i = 0];
|
||||
while (--length) {
|
||||
id += '\u0001' + args[++i];
|
||||
}
|
||||
while (--length) id += '\u0001' + args[++i];
|
||||
} else {
|
||||
id = '\u0002';
|
||||
}
|
||||
@@ -45,11 +43,8 @@ module.exports = require('./_base')(function (conf, length) {
|
||||
hitListeners && conf.emit('hit', id, arguments, this);
|
||||
return cache[id];
|
||||
} else {
|
||||
if (arguments.length === 1) {
|
||||
value = call.call(fn, this, id);
|
||||
} else {
|
||||
value = apply.call(fn, this, arguments);
|
||||
}
|
||||
if (arguments.length === 1) value = call.call(fn, this, id);
|
||||
else value = apply.call(fn, this, arguments);
|
||||
if (cache.hasOwnProperty(id)) {
|
||||
throw new CustomError("Circular invocation", 'CIRCULAR_INVOCATION');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user