JavaScript equivalent of node-daemon?

I understand Node-RED is calling the JavaScript defined in the function node when a message comes in. The node-daemon node appears to allow a persistent process to handle messages via stdin/stdout/stderr. The called process is able to maintain state internally. I am wanting to know if there is an equivalent 'function' node that allows the JavaScript to handle multiple messages, rather than being called for each incoming message, and if that functionality is there, I'd appreciate a link indicating how to use it.

I am hoping avoid having to call flow.get/flow.set each time the function is called, and relying on inject nodes to provide a 'tick' to progress states after a period of time.