npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

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.

install

npm i torrent2magnet

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability