Using javascript function?

wondering if it’s possible to convert state to abbreviated state

like this https://gist.github.com/calebgrove/c285a9510948b633aa47

You can run any Javascript with Execute Script - or better in this case ExecuteScript_Sandbox