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 10.0.7 to 10.0.8

30

index.js

@@ -94,2 +94,32 @@ const WebTorrent = require('webtorrent')

async checkUserData(pathToData){
const checkPath = path.join(this._user, pathToData)
if(await fs.pathExists(checkPath)){
const statPath = await fs.stat(checkPath)
if(statPath.isDirectory()){
statPath.type = 'folder'
const fold = await fs.readdir(checkPath)
return {stat: statPath, folder: fold}
} else if(statPath.isFile()){
statPath.type = 'file'
const fil = await fs.readFile(checkPath)
return {stat: statPath, file: fil}
} else {
throw new Error('must be a directory or file')
}
} else {
throw new Error('path does not exist')
}
}
async trashUserData(pathToData){
const checkPath = path.join(this._user, pathToData)
if(await fs.pathExists(checkPath)){
await fs.remove(checkPath)
return checkPath + ' was removed'
} else {
throw new Error('path does not exist')
}
}
encodeSigData (msg) {

@@ -96,0 +126,0 @@ const ref = { seq: msg.seq, v: msg.v }

2

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