mirror of
https://github.com/BreizhHardware/memoizee.git
synced 2026-03-18 21:40:27 +01:00
Provide access to references count
This commit is contained in:
@@ -32,4 +32,9 @@ ext.refCounter = function (ignore, conf, options) {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
conf.memoized.getRefCount = function () {
|
||||
var id = conf.get(arguments);
|
||||
if (!cache.hasOwnProperty(id)) return 0;
|
||||
return cache[id];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user