Socket
Socket
Sign inDemoInstall

bittorrent-fetch

Package Overview
Dependencies
158
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.3

19

index.js

@@ -5,2 +5,3 @@ const makeFetch = require('make-fetch')

const parseRange = require('range-parser')
const Torrentz = require('torrentz')

@@ -10,25 +11,13 @@ const checkHash = /^[a-fA-F0-9]{40}$/

const checkTitle = /^[a-zA-Z0-9]/
const DEFAULT_OPTS = { folder: __dirname, storage: 'storage', author: 'author' }
// const DEFAULT_OPTS = {}
module.exports = function makeBTFetch (opts = {}) {
const finalOpts = { ...DEFAULT_OPTS, ...opts }
// const finalOpts = { ...DEFAULT_OPTS, ...opts }
const SUPPORTED_METHODS = ['GET', 'PUT', 'DELETE', 'HEAD']
// const sideType = '-'
const hostType = '_'
const app = finalOpts.torrentz
const app = new Torrentz(opts)
// const prog = new Map()
// async function getBody (body) {
// let mainData = ''
// for await (const data of body) {
// mainData += data
// }
// return mainData
// }
function getMimeType (path) {

@@ -35,0 +24,0 @@ let mimeType = mime.getType(path) || 'text/plain'

{
"name": "bittorrent-fetch",
"version": "1.1.0",
"version": "1.1.3",
"description": "coming soon",

@@ -24,3 +24,4 @@ "main": "index.js",

"range-parser": "^1.2.1",
"stream-async-iterator": "^2.0.0"
"stream-async-iterator": "^2.0.0",
"torrentz": "^1.0.7"
},

@@ -27,0 +28,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc