lib/filter.js
function filterSchemas(schemas, tableNames, callback) {
  if (! (schemas || []).length || ! (tableNames || []).length)
    return process.nextTick(_.partial(callback, null, schemas || []));

  var schemasMap = _.indexBy(schemas, 'tableName');
  var filteredSchemas = _.chain(schemasMap).pick(tableNames).toArray().value();
  resolveSchemasDeps(filteredSchemas, schemasMap, callback);
}
function filterSchemas(schemas, tableNames, callback) {
  if (! (schemas || []).length || ! (tableNames || []).length)
    return process.nextTick(_.partial(callback, null, schemas || []));

  var schemasMap = _.indexBy(schemas, 'tableName');
  var filteredSchemas = _.chain(schemasMap).pick(tableNames).toArray().value();
  resolveSchemasDeps(filteredSchemas, schemasMap, callback);
}
function filterSchemas ( schemas , tableNames , callback ) { if ( ! ( schemas || [ ] ) . length || ! ( tableNames || [ ] ) . length ) return process . nextTick ( _ . partial ( callback , null , schemas || [ ] ) ) ; var schemasMap = _ . indexBy ( schemas , 'tableName' ) ; var filteredSchemas = _ . chain ( schemasMap ) . pick ( tableNames ) . toArray ( ) . value ( ) ; resolveSchemasDeps ( filteredSchemas , schemasMap , callback ) ; }
Filter provided schemas using tableNames and
include schemas dependencies.

@param {[Schema]} schemas
@param {[String]} tableNames
@param {Function} callback
Filter provided schemas using tableNames and include schemas dependencies .