ics-to-json

1.0.0 • Public • Published

ics-to-json


Convert the ICS calendar format to JSON data to consume in web apps.

Usage

import icsToJson from 'ics-to-json'
 
// Get ICS text however you like, example below
// Make sure you have the right CORS settings if needed
const convert = async (fileLocation) => {
    const icsRes = await fetch(fileLocation)
    const icsData = await icsRes.text()
    // Convert
    const data = icsToJson(icsData)
    return data
}

Format

Result is an array of:

{
  startDate: '20180505T020000Z',
  endDate: '20180505T060000Z',
  description: 'Big Event!',
  location: 'The place!',
  summary: 'Summary!'
}

Upcoming

  • Ability to reverse conversion
  • Include the rest of the keys from the ICS format

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    168
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    168
  • 0.2.1
    0
  • 0.2.0
    0
  • 0.1.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i ics-to-json

Weekly Downloads

168

Version

1.0.0

License

MIT

Unpacked Size

151 kB

Total Files

9

Last publish

Collaborators

  • cwlsn