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:
-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