diff options
author | Diego RodrÃguez Baquero <github@diegorbaquero.com> | 2021-07-03 01:33:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 01:33:07 +0300 |
commit | 0e2c88e9ebcccc9d831fc06deda16cea24247281 (patch) | |
tree | 550a3b9cfadee5c6500a14eaf2eb6106cb19e005 /README.md | |
parent | 5917ac93da67fe02929af2bacc4c192660716aa1 (diff) |
docs: no more var (#2123)
* docs: no more var
* Update api.md
* remove var
* remove var
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) { |