
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
dot-torrent
Advanced tools
Library for parsing and creating torrent files
Fast and easy to use
Written in TypeScript
Fully tested with 100% code coverage
npm install --save dot-torrent
import dotTorrent from 'dot-torrent';
// parse from the buffer or the string
const torrent = dotTorrent.parse( fs.readFileSync('path/to/the/file.torrent') );
// parse from file sync
const torrent = dotTorrent.parseFromFileSync('path/to/the/file.torrent');
// parse from file async
const torrent = await dotTorrent.parseFromFileAsync('path/to/the/file.torrent');
// torrent
{
announce: 'https://test-tracker-1.net/testtopic.php?t=1111111',
announceList: [
'https://test-tracker-1.net/testtopic.php?t=1111111',
'https://test-tracker-2.net/testtopic.php?t=2222222',
'https://test-tracker-3.net/testtopic.php?t=3333333'
],
comment: 'Amazing torrent',
createdBy: 'https://www.npmjs.com/package/dot-torrent',
createdAt: 1586292962,
encoding: 'UTF-8',
files: [ {
length: 100500,
path: 'awesome_torrent.txt'
} ],
infoHash: '600ccd1b71569232d01d110bc63e906beab04d8c',
name: 'awesome_torrent.txt',
private: false,
publisher: 'isolomak',
publisherUrl: 'https://www.npmjs.com/package/dot-torrent',
totalLength: 100500,
pieceLength: 32768,
pieces: <Buffer 4d 92 fb 38 ... fe 74 59 b4 67 56 05>
}
import dotTorrent from 'dot-torrent';
const parameters = {
announceList: [
'https://testtracker-1.net/testtopic.php?t=1111111'
],
source: './path/to/the/folder/or/a/file',
comment: 'Amazing torrent', // optional
name: 'awesome_torrent.txt', // optional
private: false, // optional (false by default)
publisher: 'isolomak', // optional
publisherUrl: 'https://www.npmjs.com/package/dot-torrent' // optional
};
const outputPath = './torrents/awesome.torrent';
await dotTorrent.create(parameters, outputPath);
npm test
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Parse and create torrent files
The npm package dot-torrent receives a total of 5 weekly downloads. As such, dot-torrent popularity was classified as not popular.
We found that dot-torrent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.