as cool as this is, i feel that anything with the complexity of more than one or two arguments should really be written in a different language, like Python (or AppleScript for macOS users). bash just isn’t the right tool for the job then.
You must be joking.
Also don't worry, you can write AppleScript in JavaScript syntax too! Too bad 100% of the code samples out there to help you are in the "other" syntax :D