You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// can now receive webhook events at /api/github/webhooks
57
58
```
58
59
@@ -81,7 +82,7 @@ source.onmessage = (event) => {
81
82
};
82
83
```
83
84
84
-
`EventSource` is a native browser API and can be polyfilled for browsers that don’t support it. In node, you can use the [`eventsource`](https://github.com/EventSource/eventsource) package: install with `npm install eventsource`, then `const EventSource = require('eventsource')`
85
+
`EventSource` is a native browser API and can be polyfilled for browsers that don’t support it. In node, you can use the [`eventsource`](https://github.com/EventSource/eventsource) package: install with `npm install eventsource`, then `import EventSource from "eventsource";)`
85
86
86
87
## API
87
88
@@ -278,7 +279,7 @@ Additionally, if verification fails, rejects the returned promise and emits an `
278
279
Example
279
280
280
281
```js
281
-
const { Webhooks } =require("@octokit/webhooks");
282
+
import { Webhooks } from"@octokit/webhooks";
282
283
constwebhooks=newWebhooks({
283
284
secret:"mysecret",
284
285
});
@@ -509,8 +510,8 @@ The `.removeListener()` method belongs to the `event-handler` module which can b
0 commit comments