diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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) { |