Gathering detailed insights and metrics for ical-toolkit
Gathering detailed insights and metrics for ical-toolkit
Gathering detailed insights and metrics for ical-toolkit
Gathering detailed insights and metrics for ical-toolkit
izi-ical-toolkit
ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
@machinshin/ical-toolkit
ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
@denzorn/ical-toolkit
ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
npm install ical-toolkit
Typescript
Module System
Node Version
NPM Version
82.8
Supply Chain
99.6
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,694,046
Last Day
876
Last Week
4,858
Last Month
14,859
Last Year
202,136
NOASSERTION License
32 Stars
17 Commits
15 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Apr 16, 2025
Minified
Minified + Gzipped
Latest Version
1.0.9
Package Id
ical-toolkit@1.0.9
Size
50.73 kB
NPM Version
2.12.1
Node Version
0.10.35
Published on
Jul 07, 2015
Cumulative downloads
Total Downloads
Last Day
115.2%
876
Compared to previous day
Last Week
51.8%
4,858
Compared to previous week
Last Month
-6.4%
14,859
Compared to previous month
Last Year
-65.7%
202,136
Compared to previous year
1
2
#ICal Toolkit NodeJS ICal generator/updater/parser with Timezone/DST, Alams, Organizers, Events, etc. support.
100% JavaScript implementation.
Ical generator supports the following:
VTIMEZONE - TIMEZONE/DST info. We have inbuilt timezone database, you just specify TimeZone ID and rest module will take care.
Alarms
Attendees info and state per event.
Organizers
Multiple events
Full day and repeating events
URL property
Simple intuitive interface.
##Install
1> npm install ical-toolkit
##Builder Quick documentation, but covers all and will get you going quick!
####Values to use: Here are the constants you can use:
#####Attendee Role
"REQ-PARTICIPANT"; Indicates a participant whose
; participation is required
"OPT-PARTICIPANT" ; Indicates a participant whose
; participation is optional
"NON-PARTICIPANT" ; Indicates a participant who is
; copied for information purposes only
#####Attendee Status
"NEEDS-ACTION" ; Event needs action
"ACCEPTED" ; Event accepted
"DECLINED" ; Event declined
"TENTATIVE" ; Event tentatively accepted
"DELEGATED" ; Event delegated
#####Methods
'PUBLISH',
'REQUEST',
'REPLY',
'ADD',
'CANCEL',
'REFRESH',
'COUNTER',
'DECLINECOUNTER'
#####Repeating Freq for event
'SECONDLY',
'MINUTELY',
'HOURLY',
'DAILY',
'WEEKLY',
'MONTHLY',
'YEARLY'
#####Statuses for event
'CONFIRMED',
'TENTATIVE',
'CANCELLED'
###Demo code, shows all.
1var icalToolkit = require('ical-toolkit'); 2 3//Create a builder 4var builder = icalToolkit.createIcsFileBuilder(); 5 6/* 7 * Settings (All Default values shown below. It is optional to specify) 8 * */ 9builder.spacers = true; //Add space in ICS file, better human reading. Default: true 10builder.NEWLINE_CHAR = '\r\n'; //Newline char to use. 11builder.throwError = false; //If true throws errors, else returns error when you do .toString() to generate the file contents. 12builder.ignoreTZIDMismatch = true; //If TZID is invalid, ignore or not to ignore! 13 14 15/** 16 * Build ICS 17 * */ 18 19//Name of calander 'X-WR-CALNAME' tag. 20builder.calname = 'Yo Cal'; 21 22//Cal timezone 'X-WR-TIMEZONE' tag. Optional. We recommend it to be same as tzid. 23builder.timezone = 'america/new_york'; 24 25//Time Zone ID. This will automatically add VTIMEZONE info. 26builder.tzid = 'america/new_york'; 27 28//Method 29builder.method = 'REQUEST'; 30 31//Add events 32builder.events.push({ 33 34 //Event start time, Required: type Date() 35 start: new Date(), 36 37 //Event end time, Required: type Date() 38 end: new Date(), 39 40 //transp. Will add TRANSP:OPAQUE to block calendar. 41 transp: 'OPAQUE', 42 43 //Event summary, Required: type String 44 summary: 'Test Event', 45 46 //All Optionals Below 47 48 //Alarms, array in minutes 49 alarms: [15, 10, 5], 50 51 //Optional: If you need to add some of your own tags 52 additionalTags: { 53 'SOMETAG': 'SOME VALUE' 54 }, 55 56 //Event identifier, Optional, default auto generated 57 uid: null, 58 59 //Optional, The sequence number in update, Default: 0 60 sequence: null, 61 62 //Optional if repeating event 63 repeating: { 64 freq: 'DAILY', 65 count: 10, 66 interval: 10, 67 until: new Date() 68 }, 69 70 //Optional if all day event 71 allDay: true, 72 73 //Creation timestamp, Optional. 74 stamp: new Date(), 75 76 //Optional, floating time. 77 floating: false, 78 79 //Location of event, optional. 80 location: 'Home', 81 82 //Optional description of event. 83 description: 'Testing it!', 84 85 //Optional Organizer info 86 organizer: { 87 name: 'Kushal Likhi', 88 email: 'test@mail', 89 sentBy: 'person_acting_on_behalf_of_organizer@email.com' //OPTIONAL email address of the person who is acting on behalf of organizer. 90 }, 91 92 //Optional attendees info 93 attendees: [ 94 { 95 name: 'A1', //Required 96 email: 'a1@email.com', //Required 97 status: 'TENTATIVE', //Optional 98 role: 'REQ-PARTICIPANT', //Optional 99 rsvp: true //Optional, adds 'RSVP=TRUE' , tells the application that organiser needs a RSVP response. 100 }, 101 { 102 name: 'A2', 103 email: 'a2@email.com' 104 } 105 ] 106 107 //What to do on addition 108 method: 'PUBLISH', 109 110 //Status of event 111 status: 'CONFIRMED', 112 113 //Url for event on core application, Optional. 114 url: 'http://google.com' 115}); 116 117//Optional tags on VCALENDAR level if you intent to add. Optional field 118builder.additionalTags = { 119 'SOMETAG': 'SOME VALUE' 120}; 121 122 123//Try to build 124var icsFileContent = builder.toString(); 125 126//Check if there was an error (Only required if yu configured to return error, else error will be thrown.) 127if (icsFileContent instanceof Error) { 128 console.log('Returned Error, you can also configure to throw errors!'); 129 //handle error 130} 131 132//Here isteh ics file content. 133console.log(icsFileContent); 134
####Output####
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
X-WR-CALNAME:Yo Cal
METHOD:REQUEST
PRODID:node-ical-toolkit
X-WR-TIMEZONE:asia/kalcutta
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:f0e532a3
DTSTAMP:20150707T070727Z
TRANSP:OPAQUE
DTSTART;VALUE=DATE:20150707
DTEND;VALUE=DATE:20150707
SUMMARY:Test Event
SEQUENCE:0
LOCATION:Home
DESCRIPTION:Testing it!
URL;VALUE=URI:http://google.com
STATUS:CONFIRMED
ORGANIZER;SENT-BY="MAILTO:hello@test.com":CN="Kushal Likhi":mailto:test@mail
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;RSVP=TRUE;CN=A1:MAILTO:a1@email.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=A2:MAILTO:a2@email.com
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER:-PT10M
ACTION:DISPLAY
END:VALARM
BEGIN:VALARM
TRIGGER:-PT5M
ACTION:DISPLAY
END:VALARM
RRULE:FREQ=DAILY;COUNT=10;INTERVAL=10;UNTIL=20150707T070727Z
SOMETAG:SOME VALUE
END:VEVENT
SOMETAG:SOME VALUE
END:VCALENDAR
##Parser## Parse the ics files to JSON structures
1 it('should parse the content sync', function (done) { 2 var json = icalToolkit.parseToJSON(icsContent); 3 assert(json); 4 assert(!(json instanceof Error)); 5 assert(json.VCALENDAR); 6 done(); 7 }); 8 9 it('should parse the content async', function (done) { 10 icalToolkit.parseToJSON(icsContent, function (err, json) { 11 if (err) throw err; 12 assert(json); 13 assert(!(json instanceof Error)); 14 assert(json.VCALENDAR); 15 done(); 16 }); 17 }); 18 19 it('should parse the file', function (done) { 20 icalToolkit.parseFileToJSON(sampleFilePAth, function (err, json) { 21 if (err) throw err; 22 assert(json); 23 assert(!(json instanceof Error)); 24 assert(json.VCALENDAR); 25 done(); 26 }); 27 }); 28 29 it('should parse the file sync', function (done) { 30 var json = icalToolkit.parseFileToJSONSync(sampleFilePAth); 31 assert(json); 32 assert(!(json instanceof Error)); 33 assert(json.VCALENDAR); 34 done(); 35 }); 36
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More