torrent2magnet

1.0.0 • Public • Published

torrent2magnet

npm Package License build status downloads per month Greenkeeper badge

Takes a torrent file and returns it's magnet uri.

Install

Install via npm install torrent2magnet

Usage

const torrent2magnet = require('torrent2magnet');
 
# Async
torrent2magnet(torrentUrl, options, (err, uri) => {
  if (err) {
    return console.error(err);
  }
 
  console.log(uri);
});
 
Promise
torrent2magnet(torrentUrl, options).then(uri => {
  console.log(uri);
}).catch(err => {
  console.error(err);
});
 
# Sync
try {
  console.log(torrent2magnet(torrentUrl));
} catch (err) {
  console.log(err);
}

License

MIT

Fork of apsdehal/torrent-to-magnet.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    0

Package Sidebar

Install

npm i torrent2magnet

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.65 kB

Total Files

9

Last publish

Collaborators

  • honzahommer