No description
|
|
||
|---|---|---|
| src | ||
| test | ||
| .gitignore | ||
| biome.json | ||
| bun.lockb | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| upcoming.ts | ||
upcoming
Get the upcoming events from an iCal source. Recurring events are expanded as necessary.
Installation
Add the library to your list of dependencies:
bun add git+https://code.barbed.fr/karthanistyr/upcoming
Usage
Start by creating the raw calendar
import { getCalendar } from 'upcoming';
let calendar = await getCalendar("<url to the ical data source>");
Then create the class to handle your queries:
import { EventList } from 'upcoming';
let event_list = new EventList(calendar.events);
Query the Event List for events in a given timeframe:
let upcoming_events = event_list.getEventsForNextDays(<number of days>);
Development
This project uses bun as its package manager, test runner and bundler. Install bun from here: https://bun.sh/
Install dependencies:
bun install
Check code formatting and linting:
bun format
Run tests
bun cover
Build a working bundle (note that this is not the standard bun build hence the run):
bun run build
This project was created using bun init in bun v1.1.2. Bun is a fast all-in-one JavaScript runtime.