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 5.0.8 to 5.0.9

28

index.js

@@ -837,5 +837,29 @@ const WebTorrent = require('webtorrent')

}
async listDirectory(){
return await fs.readdir(this._storage, {withFileTypes: true})
async listDirectory(data){
return await fs.readdir(this._storage, {withFileTypes: data})
}
async listAuthor(data){
if(data){
const listFiles = await fs.readdir(this._author, {withFileTypes: false})
const parseFiles = []
for(const test of listFiles){
const parseTest = JSON.parse((await fs.readFile(path.join(this._author, test))).toString())
if(parseTest.address){
parseTest.id = parseTest.address
parseTest.link = `bt://${parseTest.address}/`
} else if(parseTest.title){
parseTest.id = parseTest.title
parseTest.link = `bt://${parseTest.infohash}/`
}
parseFiles.push(parseTest)
}
return parseFiles
} else {
const listFiles = await fs.readdir(this._author, {withFileTypes: false})
return listFiles.map((data) => {return {id: data, link: `bt://${data}/`}})
}
}
async getAuthorOnly(){
return await fs.readdir(this._author, {withFileTypes: false})
}
}

@@ -842,0 +866,0 @@

2

package.json
{
"name": "torrentz",
"version": "5.0.8",
"version": "5.0.9",
"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