Install from npm
@oxhq/calit-now once in a browser entry point to register <cal-it>. For calendar links or iCalendar files without a DOM, use @oxhq/calit-now/core.
Self-host the scripts
Download the built assets and serve them with a JavaScript MIME type from your own site. You can also build them withnpm ci && npm run build from the OSS repository.
Public functions
core.mjs.
normalizeEvent(event)returnsfromanduntilas epoch milliseconds,allDay, and the normalized metadata. Invalid input throws.buildCalendarLinks(event)returns the three provider editor URLs; it does not make any network requests.toICS(event, { now })returns iCalendar text. The optionalnowis a Date to control the export timestamp in tests. Supply a stableuidto identify the same event across exports; reimport behavior depends on the calendar app.
npm test; the browser suite is npm run test:browser after installing Chromium as described in the repository.