webtorrent
webtorrent copied to clipboard
ES8 Target
- [ ] addr-to-ip-port
- [ ] bep53-range
- [ ] bittorrent-dht
- [ ] bittorrent-peerid
- [ ] bittorrent-protocol
- [ ] bittorrent-tracker
- [ ] bittorrent-lsd
- [ ] create-torrent
- [ ] fs-chunk-store
- [ ] instant.io
- [ ] ip-set
- [ ] load-ip-set
- [ ] lt_donthave
- [ ] magnet-uri
- [ ] node-bencode
- [ ] parse-torrent
- [ ] render-media
- [ ] string2compact
- [ ] torrent-discovery
- [ ] torrent-piece
- [ ] ut_metadata
- [ ] ut_pex
- [ ] webtorrent
- [ ] webtorrent-cli
- [ ] webtorrent-desktop
- [ ] webtorrent-fixtures
- [ ] webtorrent-hybrid
- [ ] webtorrent.io
Things we can use:
-
const / let
-
async / await
- classes
- block-scoped variables
- arrow functions
-
Array.includes
- template literals
- de-structuring
- ESM
👍 Was a while since i worked in webtorrent but it dosen't seems new to me apart from ESM? Would like to see more use of
- for-await-of
- symbol.asyncIterator
- less use of Buffer and more use of Uint8Array, TextEncoder/decoder and DataView
basically less connected to node's core modules https://www.youtube.com/watch?v=6EDaayYnw6M
For the first two, they are supported in ES9 (2018), which we don't plan to support YET, because it drops Firefox 78 support. Less use of Buffer is def on the way :)
Example https://github.com/webtorrent/bittorrent-tracker/commit/e5994d2ebdec10fe2165e31f5b498382eeeaaf5f
Example https://github.com/webtorrent/bittorrent-protocol/commit/3d3e244319036583230d64824ce1388287233e02
Hey @DiegoRBaquero I would like to work on it do you have any suggestions on which section I can work on refactoring. Thanks!