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>2015-03-01 00:56:42 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-01 00:56:42 +0300
commit56fcce4366b27ff7be902a283a6073aa9420bac2 (patch)
tree0772a797f6a9251a157b4fbccb401fec2fe7adf0 /index.js
parenta44506e679b5c4ac7341bbb3ef277e2c092362e9 (diff)
doc: `client.get` can return `null`
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.js b/index.js
index 4332f06..bb1ddb1 100644
--- a/index.js
+++ b/index.js
@@ -117,10 +117,11 @@ Object.defineProperty(WebTorrent.prototype, 'ratio', {
/**
* Returns the torrent with the given `torrentId`. Convenience method. Easier than
- * searching through the `client.torrents` array.
+ * searching through the `client.torrents` array. Returns `null` if no matching torrent
+ * found.
*
* @param {string|Buffer|Object} torrentId
- * @return {Torrent}
+ * @return {Torrent|null}
*/
WebTorrent.prototype.get = function (torrentId) {
var self = this