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>2016-07-27 02:14:03 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-07-27 02:14:03 +0300
commitba20b584df463cb0e835d9916f5496e37ce448d5 (patch)
treec8fcd010db865721251eb46a85011e5cbe4bb30b /index.js
parente55854a90d57ae7d97f727aca2867f6c7f5b2429 (diff)
Fixes for PR #851
Diffstat (limited to 'index.js')
-rw-r--r--index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.js b/index.js
index 221a19b..19a3322 100644
--- a/index.js
+++ b/index.js
@@ -31,8 +31,10 @@ var VERSION = require('./package.json').version
* '0.16.1' -> '0016'
* '1.2.5' -> '0102'
*/
-var m = VERSION.match(/([0-9]+)/g).slice(0, 2)
-var VERSION_STR = zeroFill(2, m[0]) + zeroFill(2, m[1])
+var VERSION_STR = VERSION.match(/([0-9]+)/g)
+ .slice(0, 2)
+ .map(function (v) { return zeroFill(2, v) })
+ .join('')
/**
* Version prefix string (used in peer ID). WebTorrent uses the Azureus-style