sqlpad
Version:
Web app. Write SQL and visualize the results. Supports Postgres, MySQL, SQL Server, Crate, Vertica and SAP HANA.
19 lines (15 loc) • 384 B
JavaScript
const definitions = require('./configItems');
/**
* Gets config values from argv param
* @param {object} argv
* @returns {object} configMap
*/
module.exports = function getCliConfig(argv) {
return definitions.reduce((confMap, definition) => {
const { key } = definition;
if (argv[key] != null) {
confMap[key] = argv[key];
}
return confMap;
}, {});
};