Opal-Estate-Pro/node_modules/rechoir/lib/normalize.js
2019-09-13 11:27:52 +07:00

16 lines
271 B
JavaScript
Executable File

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);
};