UNPKG

starforged-cli

Version:

My goal is for this to be an easy-to-use CLI for playing Starforged solo. If your game ends up in a broken state of some sort, and no command yet exists to fix your issue, all of the game data you accumulate is stored in `~/starforged-cli/db.json` and you

19 lines (13 loc) 392 B
const prompts = require("prompts"); const { readDb } = require("../db"); async function viewEvent() { const data = await readDb(); const { count } = await prompts({ type: "number", name: "count", message: "How many events?", }); const events = data.events ?? []; console.log(`\n...\n\n${events.slice(count * -1).join("\n\n")}\n`); } module.exports = { viewEvent };