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-12-18 02:44:03 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-12-18 02:44:03 +0300
commit1293fbd2436a01abd296df3de5c5a20bcbdaf047 (patch)
tree235b0e1b946e45d83d6618216456a5afa14d4e87 /index.js
parent147311347388e02fcc93cdadc17dc7cc2ec99397 (diff)
set client version in node too
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 0a15642..75d05cc 100644
--- a/index.js
+++ b/index.js
@@ -31,7 +31,8 @@ inherits(WebTorrent, EventEmitter)
* '0.16.1' -> '0016'
* '1.2.5' -> '0102'
*/
-var VERSION = '__VERSION__'.match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('')
+var VERSION = (require('./package.json').version || '__VERSION__')
+ .match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('')
/**
* WebTorrent Client