Create and save a factory, found by type.

@param {String} Factory name
@param {Object} Custom attributes [optional]
@param {Function} Callback
@api public
function factory(name, attrs, fn) {
  if (arguments.length === 2) {
    fn = attrs;
    attrs = null;
  }

  factories.get(name).create(attrs, fn);
}