cat-bookmarker/assets/node_modules/rechoir/lib/normalize.js

14 lines
259 B
JavaScript
Raw Normal View History

2024-03-10 18:52:04 +00: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);
};