diff options
Diffstat (limited to 'node_modules/rechoir/lib/normalize.js')
-rw-r--r-- | node_modules/rechoir/lib/normalize.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/rechoir/lib/normalize.js b/node_modules/rechoir/lib/normalize.js new file mode 100644 index 000000000..0da5e586f --- /dev/null +++ b/node_modules/rechoir/lib/normalize.js @@ -0,0 +1,15 @@ +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); +}; |