$ npm install is-torrent
Detects if a given file path/buffer is a torrent file.
$ npm install --save is-torrent
var isTorrent = require('is-torrent'); isTorrent('my.torrent'); // true/false
MIT © Hemanth.HM