webtorrent / webtorrent/node-bencode
add example code to decode torrent file
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 173
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
the readme has examples only to decode strings, but not files
import fs from 'fs'
import bencode from 'bencode'
var buffer = fs.readFileSync('input.torrent')
var objectUtf8 = bencode.decode(buffer, 'utf8')
console.log(objectUtf8)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the README and review the existing examples that decode strings. Add a comparable example for reading and decoding a torrent file using the JavaScript shown in the issue, then verify the README clearly demonstrates file decoding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100