Gathering detailed insights and metrics for @flowr-es/ical-generator
Gathering detailed insights and metrics for @flowr-es/ical-generator
Gathering detailed insights and metrics for @flowr-es/ical-generator
Gathering detailed insights and metrics for @flowr-es/ical-generator
npm install @flowr-es/ical-generator
Typescript
Module System
Min. Node Version
Node Version
NPM Version
59.6
Supply Chain
83.2
Quality
76
Maintenance
100
Vulnerability
99.6
License
v8.0.2-develop.6
Published on 28 Nov 2024
v8.0.2-develop.5
Published on 19 Nov 2024
v8.0.2-develop.4
Published on 12 Nov 2024
v8.0.2-develop.3
Published on 05 Nov 2024
v8.0.2-develop.2
Published on 29 Oct 2024
v8.0.2-develop.1
Published on 22 Oct 2024
TypeScript (98.91%)
JavaScript (0.9%)
CSS (0.2%)
Total Downloads
2,862
Last Day
1
Last Week
6
Last Month
47
Last Year
791
759 Stars
1,775 Commits
160 Forks
11 Watching
4 Branches
68 Contributors
Latest Version
5.1.6
Package Id
@flowr-es/ical-generator@5.1.6
Unpacked Size
701.99 kB
Size
136.29 kB
File Count
17
NPM Version
8.19.4
Node Version
16.20.2
Publised On
08 Nov 2023
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
500%
6
Compared to previous week
Last month
88%
47
Compared to previous month
Last year
-42.9%
791
Compared to previous year
1
9
32
ical-generator
is a small but fine library with which you can very easily create a valid iCal calendars, for example
to generate subscriptionable calendar feeds.
npm install ical-generator
# For TypeScript Users
# (see "I use Typescript and get TS2307: Cannot find module errors" section below)
npm i -D @types/node rrule moment-timezone moment dayjs @types/luxon
1import ical from 'ical-generator'; 2import http from 'node:http'; 3 4const calendar = ical({name: 'my first iCal'}); 5const startTime = new Date(); 6const endTime = new Date(); 7endTime.setHours(startTime.getHours()+1); 8calendar.createEvent({ 9 start: startTime, 10 end: endTime, 11 summary: 'Example Event', 12 description: 'It works ;)', 13 location: 'my room', 14 url: 'http://sebbo.net/' 15}); 16 17http.createServer((req, res) => calendar.serve(res)) 18 .listen(3000, '127.0.0.1', () => { 19 console.log('Server running at http://127.0.0.1:3000/'); 20 });
See the examples folder for more examples.
ical-generator supports native Date,
Day.js, Luxon's DateTime
and the older moment.js and moment-timezone
objects. You can also pass a string which is then passed to javascript's Date
internally.
It is recommended to use UTC time as far as possible. ical-generator
will output all time information as UTC time as
long as no time zone is defined. For day.js, a plugin is necessary for this, which is a prerequisite. If a time zone is
set, ical-generator
assumes that the given time matches the time zone. If a time zone is used, it is also recommended
to use a VTimezone generator. Such a function generates a VTimezone entry and returns it. For example, ical-timezones can
be used for this:
1import ical from 'ical-generator'; 2import {getVtimezoneComponent} from '@touch4it/ical-timezones'; 3 4const cal = new ICalCalendar(); 5cal.timezone({ 6 name: 'FOO', 7 generator: getVtimezoneComponent 8}); 9cal.createEvent({ 10 start: new Date(), 11 timezone: 'Europe/London' 12});
If a moment-timezone
object or Luxon's setZone
method works, ical-generator
sets it according to the time zone set
in the calendar/event.
npm test
npm run coverage
npm run browser-test
Error: Can't resolve 'fs'
?ical-generator
uses the node.js fs
module to save your calendar on the filesystem. In browser environments, you usually don't need this, so if you pass null
for fs in your bundler. In webpack this looks like this:
1{ 2 "resolve": { 3 "fallback": { 4 "fs": false 5 } 6 } 7}
It's here. If you need the changelog for
ical-generator
1.x.x and older, you'll find it here.
ReferenceError: TextEncoder is not defined
error (in some browsers)This library uses TextEncoder
, which
is available in node.js ≥ 11.0.0 and all modern browsers.
Outdated browsers may not have the necessary API and generate this error when generating the calendar.
Copyright (c) Sebastian Pekarek under the MIT license.
No vulnerabilities found.
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
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
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
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