You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

normalize.js 271B

123456789101112131415
  1. function normalizer (config) {
  2. if (typeof config === 'string') {
  3. return {
  4. module: config
  5. }
  6. }
  7. return config;
  8. };
  9. module.exports = function (config) {
  10. if (Array.isArray(config)) {
  11. return config.map(normalizer);
  12. }
  13. return normalizer(config);
  14. };