torrent-extract-hash
v1.0.0
Published
Extract infohash string from torrent object(s).
Downloads
4
Readme
node-torrent-extract-hash
Installation
npm i torrent-extract-hash
API Reference
extractHash(items) ⇒ Array.<string> ⏏
Extract infohash string from torrent object(s).
Kind: Exported function
Params
- items *
Example
var extractHash = require("torrent-extract-hash");
var file = fs.readFileSync(path.join(__dirname, "checkMyTorrentIp.png.torrent"));
extractHash(parseTorrentFile(file));
//[ 2fa71a2dbb7d53a39373a9c4e2c9d89aaa7a6db1 ]
License
MPL 2.0