Currently, I'm dealing with a situation where I have a list of variables stored in a file that I need to convert into all capital letters and separate them with underscores using JavaScript.
The variable pattern looks something like this:
AwsKey
AwsSecret
CognitoUserPool
I am looking to convert them to look like this:
AWS_KEY
AWS_SECRET
COGNITO_USER_POOL
Could someone provide guidance on how I can create a function that accomplishes this task in JavaScript? Any assistance would be greatly appreciated. Thank you.