From 223a34623d1fcdfa774ec9d81555b00eb420dd93 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Fri, 22 Nov 2013 19:21:15 +0100 Subject: [PATCH] Provide access to references count --- lib/ext/ref-counter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ext/ref-counter.js b/lib/ext/ref-counter.js index 6c0ee95..ef6e343 100644 --- a/lib/ext/ref-counter.js +++ b/lib/ext/ref-counter.js @@ -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]; + }; };