Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-12-31 09:11:01 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-12-31 12:08:01 +0300
commit5f8482e1eed7c22f51e08db52abe2d4358f04b9a (patch)
treef2373009bab948af058b99a158fc20e59d3a9414 /bin
parent748afb40d5becf6ad0b1f67c59f0a0c9a172b989 (diff)
remove unused code/modules
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 124e8c7..d3df10a 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -53,7 +53,7 @@ var argv = minimist(process.argv.slice(2), {
if (argv.version) {
console.log(require('../package.json').version)
- return done()
+ done()
}
var torrentId = argv._[0]
@@ -98,7 +98,7 @@ if (argv.help || !torrentId) {
Please report bugs! https://github.com/feross/webtorrent/issues
*/}.toString().split(/\n/).slice(1, -1).join('\n'))
- return done()
+ done()
}
if (process.env.DEBUG || argv.stdout) {
@@ -375,13 +375,13 @@ function onReady () {
linesremaining -= 8
var pieces = torrent.storage.pieces
- for(var i = 0; i < pieces.length; i++) {
+ for (var i = 0; i < pieces.length; i++) {
var piece = pieces[i]
if (piece.verified || piece.blocksWritten === 0) {
continue;
}
var bar = ''
- for(var j = 0; j < piece.blocks.length; j++) {
+ for (var j = 0; j < piece.blocks.length; j++) {
bar += piece.blocks[j] ? '{green:█}' : '{red:█}';
}
clivas.line('{4+cyan:' + i + '} ' + bar);
@@ -395,7 +395,7 @@ function onReady () {
if (torrent.parsedTorrent) {
var bits = 0
var piececount = Math.ceil(torrent.parsedTorrent.length / torrent.parsedTorrent.pieceLength)
- for(var i = 0; i < piececount; i++) {
+ for (var i = 0; i < piececount; i++) {
if (wire.peerPieces.get(i)) {
bits++
}
@@ -404,7 +404,7 @@ function onReady () {
}
var tags = []
if (wire.peerChoking) tags.push('choked')
- var reqStats = wire.requests.map(function(req) {
+ var reqStats = wire.requests.map(function (req) {
return req.piece;
})
clivas.line(