0.0.4
torrent-parser is a lightweight Deno library for parsing torrent files
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
torrent-parser 
torrent-parser is a lightweight Deno library for parsing torrent files
Usage
Decode
basic usage
import { parseTorrent } from 'https://deno.land/x/dt_torrent_parser/mod.ts'
const fd = await Deno.open('./your-torrent-file.torrent', { read: true })
// parseTorrent source arg accept Uint8Array | Buffer | Reader
const torrent = await parseTorrent(fd)
fd.close()
specify writer
import { parseTorrent } from 'https://deno.land/x/dt_torrent_parser/mod.ts'
const fd = await Deno.open('./your-torrent-file.torrent', { read: true })
// parse torrent and write to stdout
const torrent = await parseTorrent(fd, Deno.stdout)
fd.close()
Test
deno task test
# running 1 test from ./test/parser.test.ts
# test parse torrent file ... ok (11ms)
# ok | 1 passed | 0 failed (43ms)