Skip to main content

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with 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; }