How can I wrap a Node executable's output in a pager?

I've got a command-line interface to my Node.js library that can produce somewhat long output.

I'd like to include the traditional --no-pager flag, and then automatically wrap my executable in the system $PAGER. In Ruby, I'd have used exec(), or Python's os.execv(); but Node's child_process.exec() has a completely different meaning (ugh, by the way.)

At the moment, the only robust and cross-platform way I can think of to achieve this, is to write an Node extension that basically implements Ruby's process-replacing exec(). That sounds like a serious undertaking; so any other outside-the-box ideas are extremely welcomed. (=

Look at node kexec https://github.com/jprichardson/node-kexec. It lets you spawn a child process that will replace the current process.