Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
torrefy <img src="https://img.shields.io/github/languages/top/Sec-ant/torrefy" alt="Git
An ESM package that uses Web Streams API to create v1, v2 or hybrid torrents in your web browser.
🏗This package is under active development.🏗
npm i torrefy # or yarn add torrefy
import { create, encode, decode } from "torrefy";
// create a test file
const testFile = new File(
["Hello world. This is the test file content."],
"testfile.txt"
);
// calculate (hash) the meta info of the test file
const metaInfo = await create([testFile]);
// bencode meta info into a readable stream
const torrentStream = encode(metaInfo);
// tee the readable stream into two readable streams
const [torrentStream1, torrentStream2] = torrentStream.tee();
// consume the first readable stream as an array buffer
const torrentBinary = await new Response(torrentStream1).arrayBuffer();
// decode the second readable stream into meta info
const decodedMetaInfo = await decode(torrentStream2);
This package can handle input files or directories acquired from File API, File and Directory Entries API or File System Access API.
FAQs
An ESM package that uses Web Streams API to create v1, v2 or hybrid torrents in your web browser.
The npm package torrefy receives a total of 3 weekly downloads. As such, torrefy popularity was classified as not popular.
We found that torrefy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.