New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dot-torrent

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-torrent - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

8

lib/parse/TorrentParser.js

@@ -167,9 +167,9 @@ "use strict";

const torrentInfo = TorrentParser._info(decodedData);
const pieceLength = TorrentParser._pieceLength(decodedData);
if (!torrentInfo || !pieceLength || !Buffer.isBuffer(torrentInfo.pieces)) {
if (!torrentInfo || !Buffer.isBuffer(torrentInfo.pieces)) {
return [];
}
// console.log(torrentInfo.pieces.length, torrentInfo.pieces[0], pieceLength);
const pieces = [];
for (let i = 0; i < torrentInfo.pieces.length; i += pieceLength) {
pieces.push(torrentInfo.pieces.subarray(i, i + pieceLength));
for (let i = 0; i < torrentInfo.pieces.length; i += 20) {
pieces.push(torrentInfo.pieces.subarray(i, i + 20));
}

@@ -176,0 +176,0 @@ return pieces;

{
"name": "dot-torrent",
"version": "2.1.1",
"version": "2.1.2",
"description": "Parse and create torrent files",

@@ -5,0 +5,0 @@ "main": "./lib/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