NodeJS is about executing Javascript on a server, without any interaction to a web page. In short: with files and network access, but without browser.
If you wan't to create a JS library intended to run inside a web page, you don't need NodeJS.
You can use it to have a small HTTP server and to host your static files, but you can do it in any langage you want. In fact, in the case of Hammer, the example files can be run locally by the browser itself... You don't even need a static web server.