Skip to content

Instantly share code, notes, and snippets.

@pc035860
Created December 19, 2019 10:38
Show Gist options
  • Save pc035860/6afff92b6d7e02ccaa71c1679a694050 to your computer and use it in GitHub Desktop.
Save pc035860/6afff92b6d7e02ccaa71c1679a694050 to your computer and use it in GitHub Desktop.
function gen(config) {
let list = [];
for(let [serviceName, serviceObject] of Object.entries(config)) {
for (let [key, value] of Object.entries(serviceObject)) {
// console.log(`${name}.${key} = ${value}`)
list.push(`${serviceName}.${key}="${value}"`);
}
}
return `firebase functions:config:set ${list.join(" ")}`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment