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:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index ae6a50d..e2c9018 100644
--- a/README.md
+++ b/README.md
@@ -133,10 +133,10 @@ standards (no plugins, just HTML5 and WebRTC)! It's easy to get started!
##### Downloading a file is simple:
```js
-var WebTorrent = require('webtorrent')
+const WebTorrent = require('webtorrent')
-var client = new WebTorrent()
-var magnetURI = '...'
+const client = new WebTorrent()
+const magnetURI = '...'
client.add(magnetURI, function (torrent) {
// Got torrent metadata!
@@ -153,10 +153,10 @@ client.add(magnetURI, function (torrent) {
##### Seeding a file is simple, too:
```js
-var dragDrop = require('drag-drop')
-var WebTorrent = require('webtorrent')
+const dragDrop = require('drag-drop')
+const WebTorrent = require('webtorrent')
-var client = new WebTorrent()
+const client = new WebTorrent()
// When user drops files on the browser, create a new torrent and start seeding it!
dragDrop('body', function (files) {