Extending JSONata with my own functions

Is there a way in Node-RED to register my own functions so they can be accessed within a JSONata transformation? Other tools like Mulesoft allow you to extend DataWeave by add a jar file containing public Java methods, and I am hoping to do the same with JSONata. There are a number date format, include JDEdwards 'Julian' date, that I would like to perform within the context of JSONata for readability, vs referencing a function node that sets flow context and referencing that via $flowContext.

I am reading this in the JSONata documentation but is not clear. It seems like the registerFunction is the approach, but it would be best to put this in perspective of Node-RED.

Thoughts?

I believe that the JSONata implementation in Node-RED is already extended and there is (currently anyway) no option for user extensions.

A possible work-around would be to use JSONata in a function node which I think is possible though I've not tried it myself.

@dubnemo

create a client-side only plugin and do something like below

jsonata seems to be in the global context. Open node-red editor in a browser and see if you can get a reference of jsonata using the browser's console. If you can, then you have to build your plugin and set jsonata as "external" in rollup/vite/webpack