biofriction-wp-theme/node_modules/rechoir/lib/normalize.js

16 lines
271 B
JavaScript
Raw Permalink Normal View History

2021-10-26 14:18:09 +02: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);
};