dyno-bot/Dyno-master/scripts/convertConfig.js
2020-09-12 19:08:48 +01:00

18 lines
351 B
JavaScript

const dot = require('dot-object');
const config = { };
const flatConfig = dot.dot(config);
for (let k of Object.keys(flatConfig)) {
switch (typeof flatConfig[k]) {
case 'object':
case 'string':
break;
default:
flatConfig[k] += `$typeof:${typeof flatConfig[k]}`;
}
}
console.log(flatConfig);