mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +00:00
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
This commit is contained in:
parent
2ac575abfb
commit
948f85216a
31 changed files with 222 additions and 141 deletions
|
@ -68,7 +68,7 @@
|
|||
*/
|
||||
function fillHeaders(headers, object) {
|
||||
if (ArrayIsArray(object)) {
|
||||
for (const header of object) {
|
||||
for (const header of new SafeArrayIterator(object)) {
|
||||
if (header.length !== 2) {
|
||||
throw new TypeError(
|
||||
`Invalid header. Length must be 2, but is ${header.length}`,
|
||||
|
@ -205,7 +205,7 @@
|
|||
// spec but produce the same result.
|
||||
const headers = {};
|
||||
const cookies = [];
|
||||
for (const entry of list) {
|
||||
for (const entry of new SafeArrayIterator(list)) {
|
||||
const name = byteLowerCase(entry[0]);
|
||||
const value = entry[1];
|
||||
if (value === null) throw new TypeError("Unreachable");
|
||||
|
@ -405,6 +405,7 @@
|
|||
|
||||
[SymbolFor("Deno.privateCustomInspect")](inspect) {
|
||||
const headers = {};
|
||||
// deno-lint-ignore prefer-primordials
|
||||
for (const header of this) {
|
||||
headers[header[0]] = header[1];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue