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 12.0.6 to 12.0.7

10

index.js

@@ -231,7 +231,5 @@ const WebTorrent = require('webtorrent')

if (path.extname(pathToData)) {
const checkFile = mainData.files.find(file => { return pathToData === file.urlPath })
return checkFile ? checkFile : null
return {done: mainData.done, progress: mainData.progress, remain: `${mainData.downloaded} out of ${mainData.length}`, data: mainData.files.find(file => { return pathToData === file.urlPath })}
} else {
const checkFolder = mainData.files.filter(file => { return file.urlPath.startsWith(pathToData) })
return checkFolder.length ? checkFolder : null
return {done: mainData.done, progress: mainData.progress, remain: `${mainData.downloaded} out of ${mainData.length}`, data: mainData.files.filter(file => { return file.urlPath.startsWith(pathToData) })}
}

@@ -246,5 +244,5 @@ } else {

if (path.extname(pathToData)) {
return torrent.files.find(file => { return pathToData === file.urlPath })
return {done: torrent.done, progress: torrent.progress, remain: `${torrent.downloaded} out of ${torrent.length}`, data: torrent.files.find(file => { return pathToData === file.urlPath })}
} else {
return torrent.files.filter(file => {return file.urlPath.startsWith(pathToData)})
return {done: torrent.done, progress: torrent.progress, remain: `${torrent.downloaded} out of ${torrent.length}`, data: torrent.files.filter(file => {return file.urlPath.startsWith(pathToData)})}
}

@@ -251,0 +249,0 @@ }

2

package.json
{
"name": "torrentz",
"version": "12.0.6",
"version": "12.0.7",
"description": "",

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

# Torrentz
coming soon
# example
```
const options = {}
const Torrentz = require('torrentz')
const torrentz = new Torrentz(options)
```
## options
```
{
dir: "some/directory/where/all/the/data/is/stored" , // string, optional, default: __dirname
storage: "name-of-storage-directory", // string, optional, default: 'storage'
base: "name-of-database-directory", // string, optional, default: 'base'
routine: 0, // number, optional, default: 3600000
}
```
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