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
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-09-13 15:57:51 +0400
committerFeross Aboukhadijeh <feross@feross.org>2014-09-13 15:57:51 +0400
commitf33726d6fee55c0bbe8cff8b8a3e566dfee94a9e (patch)
treea9d44f0ceb666ecb6fe80f56b8203d1359d47229 /index.js
parent94a3004473f470799d6ec5cc283c12e606476f21 (diff)
alias webtorrent.download to webtorrent.add
for parity with bittorrent-client
Diffstat (limited to 'index.js')
-rw-r--r--index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.js b/index.js
index 961f0d6..57ce3ab 100644
--- a/index.js
+++ b/index.js
@@ -64,7 +64,8 @@ function WebTorrent (opts) {
* @param {Object} opts optional torrent-specific options
* @param {function=} ontorrent called when the torrent is ready (has metadata)
*/
-WebTorrent.prototype.add = function (torrentId, opts, ontorrent) {
+WebTorrent.prototype.add =
+WebTorrent.prototype.download = function (torrentId, opts, ontorrent) {
var self = this
if (typeof opts === 'function') {