Socket
Socket
Sign inDemoInstall

create-torrent

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-torrent - npm Package Compare versions

Comparing version 3.11.1 to 3.12.0

30

index.js

@@ -241,8 +241,28 @@ /*global Blob, FileList */

function onFiles (files, opts, cb) {
var announceList = opts.announceList !== undefined
? opts.announceList
: opts.announce !== undefined
? opts.announce.map(function (u) { return [ u ] })
: module.exports.announceList // default
var announceList = opts.announceList
if (!announceList) {
if (typeof opts.announce === 'string') announceList = [ [ opts.announce ] ]
else if (Array.isArray(opts.announce)) {
announceList = opts.announce.map(function (u) { return [ u ] })
}
}
if (!announceList) announceList = []
if (global.WEBTORRENT_ANNOUNCE) {
if (typeof global.WEBTORRENT_ANNOUNCE === 'string') {
announceList.push([ [ global.WEBTORRENT_ANNOUNCE ] ])
} else if (Array.isArray(global.WEBTORRENT_ANNOUNCE)) {
announceList = announceList.concat(global.WEBTORRENT_ANNOUNCE.map(function (u) {
return [ u ]
}))
}
}
// When no trackers specified, use some reasonable defaults
if (announceList.length === 0) {
announceList = announceList.concat(module.exports.announceList)
}
var torrent = {

@@ -249,0 +269,0 @@ info: {

2

package.json
{
"name": "create-torrent",
"description": "Create .torrent files",
"version": "3.11.1",
"version": "3.12.0",
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)",

@@ -6,0 +6,0 @@ "bin": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc