This library enables one to implement a BitTorrent application easily by hooking into the client logic at any level.
NOTE: This library is far from finished! Only some very basic features are in place right now.
Here's a link to the npm page.
npm install bittorrent
Take a look at demo.js for now.
3-clause BSD. A copy is included with the source.