function(criteria, cb) {
        if (_.isFunction(criteria)) { cb = criteria; criteria = undefined; }
        this.findBy(criteria, function(err, entities) {
          if (err) { return cb(err); }
          var deleteEntity = function(entity, callback) {
            entity.delete(callback);
          };
          async.each(entities, deleteEntity, function(err) {
            cb(err);
          });
        });
      }
function(criteria, cb) {
        if (_.isFunction(criteria)) { cb = criteria; criteria = undefined; }
        this.findBy(criteria, function(err, entities) {
          if (err) { return cb(err); }
          var deleteEntity = function(entity, callback) {
            entity.delete(callback);
          };
          async.each(entities, deleteEntity, function(err) {
            cb(err);
          });
        });
      }
function ( criteria , cb ) { if ( _ . isFunction ( criteria ) ) { cb = criteria ; criteria = undefined ; } this . findBy ( criteria , function ( err , entities ) { if ( err ) { return cb ( err ) ; } var deleteEntity = function ( entity , callback ) { entity . delete ( callback ) ; } ; async . each ( entities , deleteEntity , function ( err ) { cb ( err ) ; } ) ; } ) ; }
destroys (retrieve and delete) all entities matching criteria (criteria is optional)
destroys ( retrieve and delete ) all entities matching criteria ( criteria is optional )