Comparing version 0.1.2 to 0.1.3
@@ -15,3 +15,3 @@ var _ = require('lodash'); | ||
tcache.prototype.set = function (k,v) { | ||
this._cache[k%this.size] = {k:k,v:this.cloneDeep(v)}; | ||
this._cache[k%this.size] = {k:k,v:v}; | ||
} | ||
@@ -18,0 +18,0 @@ |
@@ -45,4 +45,4 @@ var _ = require('lodash'); | ||
var n = l || []; | ||
n = _.union(n,[v]); | ||
this._bp.set(k,n); | ||
n.push(v); | ||
if (!l) this._bp.set(k,n); | ||
} | ||
@@ -71,6 +71,6 @@ } | ||
if (l) { | ||
var n = _.without(l,v); | ||
if (n.length>0) | ||
this._bp.set(k,n) | ||
else | ||
var i = l.indexOf(v); | ||
if (i!=-1) | ||
l.splice(i,1); | ||
if (l.length==0) | ||
this._bp.del(k) | ||
@@ -77,0 +77,0 @@ } |
{ | ||
"author": "PushOk Software <support@pushok.com>", | ||
"name": "tingodb", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
3706804