From e307bd19ae9e594bc2f83327adcc12601f863515 Mon Sep 17 00:00:00 2001 From: Andrea Giammarchi Date: Mon, 21 Jul 2025 22:04:46 +0200 Subject: [PATCH] Typo on README.md I believe `headers.entries()` returns a *Map#entries()* like iterator so that `[key, value]` would work while `(key, value)` won't do what people think it does. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5043cb1..6ce1eae 100644 --- a/README.md +++ b/README.md @@ -486,10 +486,10 @@ headers.set('Content-Type', 'application/json') headers.add('Accept', 'application/json') headers.add('Accept', 'text/html') -for (const (name, value) of headers.entries()) { - // ('Content-Type', 'application/json') - // ('Accept', 'application/json') - // ('Accept', 'text/html') +for (const [name, value] of headers.entries()) { + // ['Content-Type', 'application/json'] + // ['Accept', 'application/json'] + // ['Accept', 'text/html'] } ```