Skip to content

Commit

Permalink
feat: use spread operator instead of Object.assign() (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored Nov 12, 2024
1 parent b0b7b03 commit f9d06fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion lib/installer/alinode_installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const Installer = require('./installer');
class AlinodeInstaller extends Installer {

constructor(options) {
super(Object.assign({}, options, { name: 'alinode' }));
super({
...options,
name: 'alinode',
});
}

async getVersion() {
Expand Down
6 changes: 4 additions & 2 deletions lib/installer/node_installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ const Installer = require('./installer');
class NodeInstaller extends Installer {

constructor(options) {
options = Object.assign({}, options, { name: 'node' });
super(options);
super({
...options,
name: 'node',
});
}

async getVersion() {
Expand Down
5 changes: 4 additions & 1 deletion lib/installer/nsolid_installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const Installer = require('./installer');
class NSolidInstaller extends Installer {

constructor(options) {
super(Object.assign({}, options, { name: 'nsolid' }));
super({
...options,
name: 'nsolid',
});
}

async getVersion() {
Expand Down

0 comments on commit f9d06fc

Please sign in to comment.