remove underscore dependency to decrease bundle size
This commit is contained in:
parent
a242112e66
commit
117eaa4288
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,4 @@
|
|||
var imports = require('soop').imports();
|
||||
var _ = imports._ || require('underscore');
|
||||
var log = imports.log || require('../util/log');
|
||||
var bitcoreDefaults = imports.config || require('../config');
|
||||
var Connection = imports.Connection || require ('./Connection');
|
||||
|
@ -12,7 +11,11 @@ GetAdjustedTime = imports.GetAdjustedTime || function () {
|
|||
|
||||
function PeerManager(config) {
|
||||
// extend defaults with config
|
||||
this.config = _.extend(bitcoreDefaults, config || {});
|
||||
this.config = config || {};
|
||||
for (var i in bitcoreDefaults)
|
||||
if (bitcoreDefaults.hasOwnProperty(i) && this.config[i] === undefined)
|
||||
this.config[i] = bitcoreDefaults[i];
|
||||
|
||||
this.active = false;
|
||||
this.timer = null;
|
||||
|
||||
|
|
|
@ -69,8 +69,7 @@
|
|||
"brfs": "=1.0.0",
|
||||
"chai": "=1.9.1",
|
||||
"uglifyify": "=1.2.3",
|
||||
"async": "~0.2.10",
|
||||
"underscore": "~1.6.0"
|
||||
"async": "~0.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
|
|
Loading…
Reference in New Issue