Hello Will,
regarding your "... or similar". If you are not only focussed here on XSJS functions, you can have a look to the User Defined Functions you can define in SQLScript (User Defined Function - SAP HANA SQLScript Reference - SAP Library). These functions can be used in your SQL. Not so mighty regarding the features like in XSJS, but maybe something which brings you already a step forward.
Best Regards,
Florian