Last active
July 19, 2023 01:47
-
-
Save mhrstmnn/d8e41fe01ef6fcdc710eb1d72847a5b4 to your computer and use it in GitHub Desktop.
Capitalization script developed to run with Node
This file contains hidden or 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
#!/usr/bin/env node | |
let args = process.argv.slice(2) | |
if (args.length === 1) { | |
args = args[0].split(' ') | |
} | |
for (let i in args) { | |
args[i] = args[i].toLowerCase() | |
args[i] = args[i][0].toUpperCase() + args[i].substring(1) | |
} | |
console.log(args.join(' ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment