Socket
Book a DemoInstallSign in
Socket

ayecal

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ayecal

Generate and serve iCal calendar files

0.1.7
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

🏴‍☠️ AyeCal

Javascript iCal creation utility.

Usage

Install from npm

npm install ayecal # or yarn add ayecal

Creating Calendars

import ayecal from 'ayecal'

// Create a calendar
// Provide a name and a "scope" which distinguishes events from other calendars
const myCalendar = ayecal({
    name: 'My Calendar',
    scope: 'custom-calendar.net',
  })
  .setTimezone('Australia/Melbourne')
  .addEvent({
    summary: 'Jacob\'s 22nd Birthday Party',
    location: 'My apartment',
    description: 'Hey everyone! Come to my party :)',
    uid: 5678, // from your API
    startTime: new Date(),
    endTime: new Date(),
  })

// Convert to an ICS string
const myICS = myCalendar.toICS()

Creating Events

import ayecal from 'ayecal'

// Create an event
const myEvent = ayecal.event({
  summary: 'Company Mixer',
  location: '32 Downtown St, Melbourne Australia',
  description: 'Hey everyone! Come to my party :)',
  uid: 5678, // from your API
  startTime: new Date(),
  endTime: new Date(),
})

// Convert to an ICS string
const eventICS = myEvent.toICS()

// Add to an existing calendar
const myCalendar = ayecal()
myCalendar.addEvent(myEvent)

Contributing

PRs are welcomed :)

Run yarn to install dependencies then yarn watch to build on file changes.

Run yarn test before committing to run the test cases.

To Do

  • Recurring Event Support
  • To Do Support
  • ICS Parsing
  • Non-mutable objects?
  • Support all fields from the iCal spec

License

MIT License, Ewan Breakey 2022

FAQs

Package last updated on 21 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.