function define(type, Model) {
  if (arguments.length === 1) {
    Model = type;
    type = Model.prototype.__type || Model.modelName;
  }

  var factory = new Factory(Model);
  factories.set(type, factory)

  return factory;
}
function define(type, Model) {
  if (arguments.length === 1) {
    Model = type;
    type = Model.prototype.__type || Model.modelName;
  }

  var factory = new Factory(Model);
  factories.set(type, factory)

  return factory;
}
function define ( type , Model ) { if ( arguments . length === 1 ) { Model = type ; type = Model . prototype . __type || Model . modelName ; } var factory = new Factory ( Model ) ; factories . set ( type , factory ) return factory ; }
Define a factory.

@param {String} Type [optional]
@param {Function} Seed model
@api public
Define a factory .