From 055169049de0ae3d2752d5ba8e37c78af9ff67a8 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:27:49 -0500 Subject: [PATCH] fix(README): update examples for ESM (#679) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 17d7ba88..c2ee8290 100644 --- a/README.md +++ b/README.md @@ -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"; ``` @@ -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 */ @@ -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 */ });