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 260B

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