/*
Returns plugins, instantiating with arguments if provided.
function getPlugins(plugins) {
  if (typeof plugins !== 'object' || !Array.isArray(plugins)) return undefined;

  return plugins
    .filter(Boolean)
    .map(plugin => {
      if (Array.isArray(plugin)) {
        // The array should have at least one item, which should be the
        // plugin package name.
        if (!plugin[0]) return undefined;

        return requireFromString(plugin[0], plugin.slice(1));
      } else if (typeof plugin === 'string') {
        return requireFromString(plugin);
      }
      return plugin;
    })
    .filter(plugin => typeof plugin !== 'undefined');
}