@njgingrich/aocrunner@0.1.18
latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
76%
Published
5 months ago (0.1.18)
import { Separator } from "npm:@inquirer/prompts@^7.1.0"; /** * Get the years that Advent of Code has been running. * @returns {Array<{ name: string, value: string }>} An array of objects with title and value properties. */ export function getYearOptions() { const currentYear = new Date().getFullYear(); const firstYear = 2015; const years = []; for (let year = currentYear; year >= firstYear; year--) { years.push({ name: `${year}`, value: `${year}` }); } years.push(new Separator()); return years; }