index.js 349 B

12345678910111213141516171819
  1. /*
  2. Copyright 2012-2015, Yahoo Inc.
  3. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  4. */
  5. var path = require('path');
  6. module.exports = {
  7. create: function (name, cfg) {
  8. cfg = cfg || {};
  9. var Cons = require(path.join(__dirname, 'lib', name));
  10. return new Cons(cfg);
  11. }
  12. };