From 7dd43d7f020c63307039bd3972eaa31573dd84f5 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 1 Dec 2024 22:42:33 +0900 Subject: [PATCH] docs: correct loadBuffer() name (#4270) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d8e3292194..681a31138e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,7 +43,7 @@ import { load } from './load-parse.js'; * import * as cheerio from 'cheerio'; * * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); + * const $ = cheerio.loadBuffer(buffer); * ``` * * @param buffer - The buffer to sniff the encoding of.