Skip to content

Commit aa6cefe

Browse files
committed
remove lodash.extend() calls
1 parent 84d1497 commit aa6cefe

File tree

16 files changed

+20
-20
lines changed

16 files changed

+20
-20
lines changed

packages/bitcore-lib-cash/lib/block/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Block(arg) {
2222
if (!(this instanceof Block)) {
2323
return new Block(arg);
2424
}
25-
_.extend(this, Block._from(arg));
25+
Object.assign(this, Block._from(arg));
2626
return this;
2727
}
2828

packages/bitcore-lib-cash/lib/block/merkleblock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function MerkleBlock(arg) {
6161
} else {
6262
throw new TypeError('Unrecognized argument for MerkleBlock');
6363
}
64-
_.extend(this,info);
64+
Object.assign(this, info);
6565
this._flagBitsUsed = 0;
6666
this._hashesUsed = 0;
6767

packages/bitcore-lib-cash/lib/opcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ for (var k in Opcode.map) {
262262
}
263263

264264
// Easier access to opcodes
265-
_.extend(Opcode, Opcode.map);
265+
Object.assign(Opcode, Opcode.map);
266266

267267
/**
268268
* @returns true if opcode is one of OP_0, OP_1, ..., OP_16

packages/bitcore-lib-cash/lib/uri.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ URI.prototype.toObject = URI.prototype.toJSON = function toObject() {
179179
json[m] = this[m].toString();
180180
}
181181
}
182-
_.extend(json, this.extras);
182+
Object.assign(json, this.extras);
183183
return json;
184184
};
185185

@@ -202,7 +202,7 @@ URI.prototype.toString = function() {
202202
if (this.r) {
203203
query.r = this.r;
204204
}
205-
_.extend(query, this.extras);
205+
Object.assign(query, this.extras);
206206

207207
return URL.format({
208208
protocol: Networks.get(this.network ,'name').prefix + ':',

packages/bitcore-lib-doge/lib/block/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Block(arg) {
2222
if (!(this instanceof Block)) {
2323
return new Block(arg);
2424
}
25-
_.extend(this, Block._from(arg));
25+
Object.assign(this, Block._from(arg));
2626
return this;
2727
}
2828

packages/bitcore-lib-doge/lib/block/merkleblock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function MerkleBlock(arg) {
6060
} else {
6161
throw new TypeError('Unrecognized argument for MerkleBlock');
6262
}
63-
_.extend(this,info);
63+
Object.assign(this, info);
6464
this._flagBitsUsed = 0;
6565
this._hashesUsed = 0;
6666
return this;

packages/bitcore-lib-doge/lib/opcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ for (var k in Opcode.map) {
224224
}
225225

226226
// Easier access to opcodes
227-
_.extend(Opcode, Opcode.map);
227+
Object.assign(Opcode, Opcode.map);
228228

229229
/**
230230
* @returns true if opcode is one of OP_0, OP_1, ..., OP_16

packages/bitcore-lib-doge/lib/uri.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ URI.prototype.toObject = URI.prototype.toJSON = function toObject() {
179179
json[m] = this[m].toString();
180180
}
181181
}
182-
_.extend(json, this.extras);
182+
Object.assign(json, this.extras);
183183
return json;
184184
};
185185

@@ -202,7 +202,7 @@ URI.prototype.toString = function() {
202202
if (this.r) {
203203
query.r = this.r;
204204
}
205-
_.extend(query, this.extras);
205+
Object.assign(query, this.extras);
206206

207207
return URL.format({
208208
protocol: 'dogecoin:',

packages/bitcore-lib-ltc/lib/block/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Block(arg) {
2323
if (!(this instanceof Block)) {
2424
return new Block(arg);
2525
}
26-
_.extend(this, Block._from(arg));
26+
Object.assign(this, Block._from(arg));
2727
return this;
2828
}
2929

packages/bitcore-lib-ltc/lib/block/merkleblock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function MerkleBlock(arg) {
6060
} else {
6161
throw new TypeError('Unrecognized argument for MerkleBlock');
6262
}
63-
_.extend(this,info);
63+
Object.assign(this, info);
6464
this._flagBitsUsed = 0;
6565
this._hashesUsed = 0;
6666
return this;

0 commit comments

Comments
 (0)