Skip to content

Commit 0551690

Browse files
authoredFeb 27, 2024··
fix(README): update examples for ESM (#679)
1 parent dbc2d38 commit 0551690

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Install with `npm install @octokit/core @octokit/plugin-throttling`. Optionally
3434
**Note**: If you use it with `@octokit/rest` v16, install `@octokit/core` as a devDependency. This is only temporary and will no longer be necessary with `@octokit/rest` v17.
3535

3636
```js
37-
const { Octokit } = require("@octokit/core");
38-
const { throttling } = require("@octokit/plugin-throttling");
37+
import { Octokit } from "@octokit/core";
38+
import { throttling } from "@octokit/plugin-throttling";
3939
```
4040

4141
</td></tr>
@@ -107,8 +107,8 @@ npm install --save ioredis
107107
Then in your application:
108108

109109
```js
110-
const Bottleneck = require("bottleneck");
111-
const Redis = require("redis");
110+
import Bottleneck from "bottleneck";
111+
import Redis from "redis";
112112

113113
const client = Redis.createClient({
114114
/* options */
@@ -145,7 +145,7 @@ await connection.disconnect();
145145
To use the `ioredis` library instead:
146146

147147
```js
148-
const Redis = require("ioredis");
148+
import Redis from "ioredis";
149149
const client = new Redis({
150150
/* options */
151151
});

0 commit comments

Comments
 (0)
Please sign in to comment.