Nightmare.js is great library, but you cannot straightforward pass functions as arguments to the evaluation context. Phobetor uses eval to run those functions in browser’s context and give you back the result.
ncc makes the 2D canvas implementation of chrome accessible from NodeJS to reduce complexity of dependencies and friction between different operating systems. It got a make-over to allow for (upcoming!) headless mode in chrome and to have a more robust startup script. Feel free to try the examples.