I suspect it was written in JS because that was the author’s language of choice. There are lots of ways to manage git identities and this seems like a decent utility for web devs who already have node installed and don’t care to manually edit config files.