lib/ttl.js
function applyTTL (cond) {
    if (cond[key]) {
      cond.$and || (cond.$and = []);
      var a = {};
      a[key] = cond[key];
      cond.$and.push(a);
      var b = {};
      b[key] = { $gt: new Date };
      cond.$and.push(b);
      delete cond[key];
    } else {
      cond[key] = { $gt: new Date };
    }
  }
function applyTTL (cond) {
    if (cond[key]) {
      cond.$and || (cond.$and = []);
      var a = {};
      a[key] = cond[key];
      cond.$and.push(a);
      var b = {};
      b[key] = { $gt: new Date };
      cond.$and.push(b);
      delete cond[key];
    } else {
      cond[key] = { $gt: new Date };
    }
  }
function applyTTL ( cond ) { if ( cond [ key ] ) { cond . $and || ( cond . $and = [ ] ) ; var a = { } ; a [ key ] = cond [ key ] ; cond . $and . push ( a ) ; var b = { } ; b [ key ] = { $gt : new Date } ; cond . $and . push ( b ) ; delete cond [ key ] ; } else { cond [ key ] = { $gt : new Date } ; } }
Applies ttl to query conditions.
@private
Applies ttl to query conditions .