Usually you get an ICalCategory object like this:
import ical from 'ical-generator';const calendar = ical();const event = calendar.createEvent();const category = event.createCategory(); Copy
import ical from 'ical-generator';const calendar = ical();const event = calendar.createEvent();const category = event.createCategory();
You can also use the ICalCategory object directly:
import ical, {ICalCategory} from 'ical-generator';const category = new ICalCategory();event.categories([category]); Copy
import ical, {ICalCategory} from 'ical-generator';const category = new ICalCategory();event.categories([category]);
Constructor of ICalCategory.
Category Data
Get the category name
0.3.0
Set the category name
Return a shallow copy of the category's options for JSON stringification. Can be used for persistence.
0.2.4
Return generated category name as a string.
console.log(category.toString()); Copy
console.log(category.toString());
Usually you get an ICalCategory object like this:
You can also use the ICalCategory object directly: