Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

torrentz

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

torrentz - npm Package Compare versions

Comparing version 4.0.9 to 5.0.0

21

index.js

@@ -490,2 +490,14 @@ const WebTorrent = require('webtorrent')

}
let kindOfId
if(this.checkAddress.test(id)){
kindOfId = 'address'
} else if(this.checkHash.test(id)){
kindOfId = 'infohash'
} else if(this.checkTitle.test(id)){
kindOfId = 'title'
} else {
throw new Error('id is not valid')
}
if(this.checkId.has(id)){

@@ -522,4 +534,8 @@ this.checkId.delete(id)

}
return {torrent: true, data: true}
} else {
const authorPath = path.join(this._author, id)
if(!await fs.pathExists(authorPath)){
throw new Error('Must be creator to delete any files or directories inside the torrent')
}
const dataPath = path.join(folderPath, pathToData)

@@ -529,4 +545,5 @@ if(await fs.pathExists(dataPath)){

}
return {torrent: false, data: true}
}
return {id, path: pathToData, type: kindOfId}
}

@@ -533,0 +550,0 @@ // async publishHash(id, hash){

2

package.json
{
"name": "torrentz",
"version": "4.0.9",
"version": "5.0.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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