1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/rechoir/lib/normalize.js

16 lines
271 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
function normalizer (config) {
if (typeof config === 'string') {
return {
module: config
}
}
return config;
};
module.exports = function (config) {
if (Array.isArray(config)) {
return config.map(normalizer);
}
return normalizer(config);
};