/ical-browser

JavaScript browser iCalendar generator

Primary LanguageTypeScriptMIT LicenseMIT

iCal Browser

DEMO

https://codepen.io/qertis/full/RweggQJ

Quick Start

Installation

npm install ical-browser

Example

import { event as createEvent, default as ical } from 'ical-browser'
const myEvent = createEvent({
  id: 'c7614cff-3560-4a00-9152-d25cc1fe077d',
  summary: 'Event Title',
  description: 'My event',
  start: new Date(),
})
const str = ical('id', myEvent)
const file = new File([new TextEncoder().encode(str)], 'calendar.ics', {
  type: 'text/calendar',
})

Copyright and license

Copyright (c) Denis Baskovsky under the MIT license.