Skip to content

HyperPh/jstorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jstorrent

bencoding and torrent parser in javascript

Example:

var {Torrent}=require('./jstorrent/torrent.cjs')
function test_torrent() {
    var t = new Torrent()
    t.load("./test.torrent")  // your torrent file
    console.log(t.data["info"]["name"].toString())
    var files = t.data["info"]["files"]
    for (var item of files)
        console.log(item["path"][0].toString())
    t.data["info"]["name"] = Buffer.from("my_name")  // change info.
    t.dump("./assets/dump.torrent")  // the new torrent file
}

About

bencoding and torrent parser in javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published