Skip to content

Commit

Permalink
Remove lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
lewissteele committed Sep 27, 2024
1 parent 8db6ed8 commit cdc633a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/commands/list.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const _ = require("lodash");
const cmd = require("@oclif/core").Command;
const { Command } = require("@oclif/core");
const { getDatabases } = require("../api/database");

module.exports = _.create(cmd.prototype, {
description: "show databases",
module.exports = class List extends Command {
static description = "show databases";

async run() {
const databases = _.keys(await getDatabases());
const databases = Object.keys(await getDatabases());

if (_.isEmpty(databases)) {
if (!databases.length) {
this.log("no databases");
return;
}

_.each(databases, (val) => this.log(val));
},
});
databases.forEach((val) => this.log(val));
}
};

0 comments on commit cdc633a

Please sign in to comment.