Skip to content

Commit

Permalink
fix(README): update examples for ESM (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Feb 27, 2024
1 parent dbc2d38 commit 0551690
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -34,8 +34,8 @@ Install with `npm install @octokit/core @octokit/plugin-throttling`. Optionally
**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.

```js
const { Octokit } = require("@octokit/core");
const { throttling } = require("@octokit/plugin-throttling");
import { Octokit } from "@octokit/core";
import { throttling } from "@octokit/plugin-throttling";
```

</td></tr>
Expand Down Expand Up @@ -107,8 +107,8 @@ npm install --save ioredis
Then in your application:

```js
const Bottleneck = require("bottleneck");
const Redis = require("redis");
import Bottleneck from "bottleneck";
import Redis from "redis";

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

```js
const Redis = require("ioredis");
import Redis from "ioredis";
const client = new Redis({
/* options */
});
Expand Down

0 comments on commit 0551690

Please sign in to comment.