index.js
function fabricator(stack, options) {
  options = options || {};

  //
  // Empty strings, arrays or objects should not be processed, return early.
  //
  if (empty(stack)) return [];

  switch (is(stack)) {
    case 'string':
      stack = read(stack, options);
    break;

    case 'object':
      stack = Object.keys(stack).reduce(iterator(read, stack, options), []);
    break;

    case 'array':
      stack = stack.reduce(iterator(read, null, options), []);
    break;

    default:
      if ('function' !== typeof stack) {
        throw new Error('Unsupported type, cannot fabricate an: '+ is(stack));
      }

      stack = [init(stack, undefined, options)];
  }

  return (stack || []).filter(Boolean);
}
function fabricator(stack, options) {
  options = options || {};

  //
  // Empty strings, arrays or objects should not be processed, return early.
  //
  if (empty(stack)) return [];

  switch (is(stack)) {
    case 'string':
      stack = read(stack, options);
    break;

    case 'object':
      stack = Object.keys(stack).reduce(iterator(read, stack, options), []);
    break;

    case 'array':
      stack = stack.reduce(iterator(read, null, options), []);
    break;

    default:
      if ('function' !== typeof stack) {
        throw new Error('Unsupported type, cannot fabricate an: '+ is(stack));
      }

      stack = [init(stack, undefined, options)];
  }

  return (stack || []).filter(Boolean);
}
Expose small fabrication helper.

Possible options:

- source:    {String}   Absolute path to be used to resolve file paths.
- recursive: {Boolean}  Should file paths be recursively discovered.
- name:      {String}   Force a name for a given constructor.

@param {Mixed} stack String, array or object that contains constructible entities
@param {Object} options Optional options.
@returns {Array} collection of constructors.
@api public