Skip to content

Commit 44f3153

Browse files
committed
Improve code style
1 parent e26303c commit 44f3153

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ declare function fetch(url: RequestInfo, init?: RequestInit): Promise<Response>
66
/** The famed Hello World plugin itself. */
77
const helloWorld: Plugin = {
88
setupPlugin: async ({ config }) => {
9-
console.log('Setting up the plugin!')
10-
console.log(config)
9+
console.log(`Setting up the plugin:\n${config.greeting}`)
1110
},
1211
processEvent: async (event, { config, cache }) => {
1312
const counterValue = (await cache.get('greeting_counter', 0)) as number
1413
cache.set('greeting_counter', counterValue + 1)
15-
if (!event.properties) event.properties = {}
14+
if (!event.properties) {
15+
event.properties = {}
16+
}
1617
event.properties['greeting'] = config.greeting
1718
event.properties['greeting_counter'] = counterValue
1819
event.properties['random'] = await fetchTrulyRandomInteger()

0 commit comments

Comments
 (0)