How to convert to a function

see https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506