mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +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
|
@ -25,6 +25,7 @@
|
|||
MathRandom,
|
||||
ObjectPrototypeIsPrototypeOf,
|
||||
Symbol,
|
||||
SafeArrayIterator,
|
||||
StringFromCharCode,
|
||||
StringPrototypeTrim,
|
||||
StringPrototypeSlice,
|
||||
|
@ -162,7 +163,7 @@
|
|||
context: "Argument 1",
|
||||
});
|
||||
|
||||
for (const entry of this[entryList]) {
|
||||
for (const entry of new SafeArrayIterator(this[entryList])) {
|
||||
if (entry.name === name) return entry.value;
|
||||
}
|
||||
return null;
|
||||
|
@ -183,7 +184,7 @@
|
|||
});
|
||||
|
||||
const returnList = [];
|
||||
for (const entry of this[entryList]) {
|
||||
for (const entry of new SafeArrayIterator(this[entryList])) {
|
||||
if (entry.name === name) ArrayPrototypePush(returnList, entry.value);
|
||||
}
|
||||
return returnList;
|
||||
|
@ -203,7 +204,7 @@
|
|||
context: "Argument 1",
|
||||
});
|
||||
|
||||
for (const entry of this[entryList]) {
|
||||
for (const entry of new SafeArrayIterator(this[entryList])) {
|
||||
if (entry.name === name) return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -298,6 +299,7 @@
|
|||
const chunks = [];
|
||||
const prefix = `--${boundary}\r\nContent-Disposition: form-data; name="`;
|
||||
|
||||
// deno-lint-ignore prefer-primordials
|
||||
for (const [name, value] of formData) {
|
||||
if (typeof value === "string") {
|
||||
ArrayPrototypePush(
|
||||
|
@ -372,7 +374,7 @@
|
|||
#parseHeaders(headersText) {
|
||||
const headers = new Headers();
|
||||
const rawHeaders = StringPrototypeSplit(headersText, "\r\n");
|
||||
for (const rawHeader of rawHeaders) {
|
||||
for (const rawHeader of new SafeArrayIterator(rawHeaders)) {
|
||||
const sepIndex = StringPrototypeIndexOf(rawHeader, ":");
|
||||
if (sepIndex < 0) {
|
||||
continue; // Skip this header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue