bittorrent-created-by

Parse bittorrent "created by" strings into objects or die trying!

npm install bittorrent-created-by
5 downloads in the last month

bittorrent-created-by build status

Parse bittorrent "created by" strings into objects or die trying!

Overview

bittorrent-created-by tries really hard to parse the ugly and often confusing "created by" fields from torrent files. The definitions it uses were built by analysing a very large collection of torrent files found in the wild.

Super Quickstart

Code:

var parseCreatedBy = require("bittorrent-created-by");

var createdBy = parseCreatedBy("uTorrent/2210");

console.log(JSON.stringify(createdBy));

Output:

{"client":"uTorrent","version":"2210"}

Installation

Available via npm:

$ npm install bittorrent-created-by

Or via git:

$ git clone git://github.com/deoxxa/bittorrent-created-by.git node_modules/bittorrent-created-by

API

parseCreatedBy

This is the only thing exposed by this module.

parseCreatedBy(string);
var createdBy = parseCreatedBy("uTorrent/2210");

License

3-clause BSD. A copy is included with the source.

Contact

npm loves you