generate-ical 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -5
- package/src/index.ts +2 -1
- package/tsconfig.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generate-ical",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lukas Wiklund",
|
|
6
6
|
"email": "lukas@wiklund.se",
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "tsc"
|
|
12
|
-
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"typescript": "^4.9.3"
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"format": "prettier --write ."
|
|
15
13
|
},
|
|
16
14
|
"dependencies": {
|
|
17
15
|
"uuid-random": "^1.3.2"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"prettier": "^2.8.0",
|
|
19
|
+
"typescript": "^4.9.3"
|
|
18
20
|
}
|
|
19
21
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import uuid from "uuid-random"
|
|
2
|
+
|
|
2
3
|
type Event = {
|
|
3
4
|
productId: string
|
|
4
5
|
startDate: Date
|
|
@@ -21,7 +22,7 @@ type Event = {
|
|
|
21
22
|
url?: string
|
|
22
23
|
} & ({ isAllDay: true; endDate?: Date } | { isAllDay: false; endDate: Date })
|
|
23
24
|
|
|
24
|
-
function
|
|
25
|
+
export default function generateIcal(data: Event): string {
|
|
25
26
|
const id = uuid()
|
|
26
27
|
let result = ""
|
|
27
28
|
|