This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https'); | |
const querystring = require('querystring'); | |
const fs = require('fs'); | |
const username = 'user'; | |
const password = 'user123'; | |
const baseAddress = `https://my-auth-server.com`; | |
const config = { | |
'client_id': 'myapi', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = { | |
"assignedTo2StepDepartmentBy": "AssiGNed to depaRTment By" | |
}; | |
function toTitleCase(str) { | |
return str.replace( | |
/\w\S*/g, | |
function(txt) { | |
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
migrateConfigs(fs.readdirSync(`C:/Solution1/Project1/Config`), `C:/Solution1/Project1/Config`); | |
function migrateConfigs(files, folder) { | |
files = files.filter(f => f.endsWith('.config') && f.startsWith('App.')); | |
for(const fileName of files) { | |
console.log(fileName) | |
const appConfig = { |