Removed zero-fill
sets the version the same way webtorrent dose
f8923a66a8/index.js (L27-L29)
This commit is contained in:
@@ -12,7 +12,6 @@ const mm = require('music-metadata')
|
|||||||
const networkAddress = require('network-address')
|
const networkAddress = require('network-address')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const WebTorrent = require('webtorrent')
|
const WebTorrent = require('webtorrent')
|
||||||
const zeroFill = require('zero-fill')
|
|
||||||
|
|
||||||
const crashReporter = require('../crash-reporter')
|
const crashReporter = require('../crash-reporter')
|
||||||
const config = require('../config')
|
const config = require('../config')
|
||||||
@@ -41,10 +40,9 @@ const VERSION = require('../../package.json').version
|
|||||||
* '0.16.1' -> '0016'
|
* '0.16.1' -> '0016'
|
||||||
* '1.2.5' -> '0102'
|
* '1.2.5' -> '0102'
|
||||||
*/
|
*/
|
||||||
const VERSION_STR = VERSION.match(/([0-9]+)/g)
|
const VERSION_STR = VERSION
|
||||||
.slice(0, 2)
|
.replace(/\d*./g, v => `0${v % 100}`.slice(-2))
|
||||||
.map((v) => zeroFill(2, v))
|
.slice(0, 4)
|
||||||
.join('')
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version prefix string (used in peer ID). WebTorrent uses the Azureus-style
|
* Version prefix string (used in peer ID). WebTorrent uses the Azureus-style
|
||||||
|
|||||||
Reference in New Issue
Block a user