diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-12-04 06:53:50 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-12-04 06:53:50 +0300 |
commit | 87ff0039b99f44f290838187164756eaed48c522 (patch) | |
tree | c3d64d4c1ccad4d5d3e1992f23cc60b20dffaad5 | |
parent | 1bd5fa676a8480cdbe0d11ed5661a49a63288fb9 (diff) |
code style
-rw-r--r-- | index.js | 4 | ||||
-rw-r--r-- | lib/torrent.js | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -154,7 +154,7 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) { if (typeof opts === 'function') return self.add(torrentId, null, opts) debug('add') if (!opts) opts = {} - else opts = extend({}, opts) + else opts = extend(opts) opts.client = self @@ -202,7 +202,7 @@ WebTorrent.prototype.seed = function (input, opts, onseed) { if (typeof opts === 'function') return self.seed(input, null, opts) debug('seed') if (!opts) opts = {} - else opts = extend({}, opts) + else opts = extend(opts) // When seeding from filesystem, initialize store from that path (avoids a copy) if (typeof input === 'string') opts.path = path.dirname(input) diff --git a/lib/torrent.js b/lib/torrent.js index e61b59c..fc6fa19 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -7,7 +7,7 @@ var createTorrent = require('create-torrent') var debug = require('debug')('webtorrent:torrent') var Discovery = require('torrent-discovery') var EventEmitter = require('events').EventEmitter -var extend = require('xtend/mutable') +var extendMutable = require('xtend/mutable') var FSChunkStore = require('fs-chunk-store') // browser: `memory-chunk-store` var ImmediateChunkStore = require('immediate-chunk-store') var inherits = require('inherits') @@ -252,7 +252,7 @@ Torrent.prototype._processParsedTorrent = function (parsedTorrent) { uniq(parsedTorrent.announce) - extend(this, parsedTorrent) + extendMutable(this, parsedTorrent) this.magnetURI = parseTorrent.toMagnetURI(parsedTorrent) this.torrentFile = parseTorrent.toTorrentFile(parsedTorrent) |