Skip to content

Commit 2521e26

Browse files
committed
Revert lib/web typos
1 parent 35e8c22 commit 2521e26

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

lib/web/eventsource/eventsource-stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class EventSourceStream extends Transform {
196196
// If the previous line ended with an end-of-line, we need to check
197197
// if the next character is also an end-of-line.
198198
if (this.eventEndCheck) {
199-
// If the current character is an end-of-line, then the event
199+
// If the the current character is an end-of-line, then the event
200200
// is finished and we can process it
201201

202202
// If the previous line ended with a carriage return, we need to

lib/web/fetch/body.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function extractBody (object, keepalive = false) {
9090
// URLSearchParams
9191

9292
// spec says to run application/x-www-form-urlencoded on body.list
93-
// this is implemented in Node.js as part of an URLSearchParams instance toString method
93+
// this is implemented in Node.js as apart of an URLSearchParams instance toString method
9494
// See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490
9595
// and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100
9696

@@ -120,7 +120,7 @@ function extractBody (object, keepalive = false) {
120120

121121
// Set action to this step: run the multipart/form-data
122122
// encoding algorithm, with object’s entry list and UTF-8.
123-
// - This ensures that the body is immutable and can't be changed afterwards
123+
// - This ensures that the body is immutable and can't be changed afterwords
124124
// - That the content-length is calculated in advance.
125125
// - And that all parts are pre-encoded and ready to be sent.
126126

@@ -215,7 +215,7 @@ function extractBody (object, keepalive = false) {
215215
length = Buffer.byteLength(source)
216216
}
217217

218-
// 12. If action is non-null, then run these steps in parallel:
218+
// 12. If action is non-null, then run these steps in in parallel:
219219
if (action != null) {
220220
// Run action.
221221
let iterator
@@ -262,7 +262,7 @@ function extractBody (object, keepalive = false) {
262262
// https://fetch.spec.whatwg.org/#bodyinit-safely-extract
263263
function safelyExtractBody (object, keepalive = false) {
264264
// To safely extract a body and a `Content-Type` value from
265-
// a byte sequence or BodyInit object, run these steps:
265+
// a byte sequence or BodyInit object object, run these steps:
266266

267267
// 1. If object is a ReadableStream object, then:
268268
if (object instanceof ReadableStream) {
@@ -278,7 +278,7 @@ function safelyExtractBody (object, keepalive = false) {
278278
}
279279

280280
function cloneBody (instance, body) {
281-
// To clone a body, run these steps:
281+
// To clone a body body, run these steps:
282282

283283
// https://fetch.spec.whatwg.org/#concept-body-clone
284284

lib/web/fetch/data-url.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function collectASequenceOfCodePoints (condition, input, position) {
147147
let result = ''
148148

149149
// 2. While position doesn’t point past the end of input and the
150-
// code point at position within input meets the condition:
150+
// code point at position within input meets the condition condition:
151151
while (position.position < input.length && condition(input[position.position])) {
152152
// 1. Append that code point to the end of result.
153153
result += input[position.position]
@@ -219,7 +219,7 @@ function percentDecode (input) {
219219
/** @type {Uint8Array} */
220220
const output = new Uint8Array(length)
221221
let j = 0
222-
// 2. For each byte in input:
222+
// 2. For each byte byte in input:
223223
for (let i = 0; i < length; ++i) {
224224
const byte = input[i]
225225

lib/web/fetch/formdata-parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function multipartFormDataParser (input, mimeType) {
183183
contentType = ''
184184
}
185185

186-
// 5.10.3. Let value be a new File object with name filename, type contentType, and body.
186+
// 5.10.3. Let value be a new File object with name filename, type contentType, and body body.
187187
value = new File([body], filename, { type: contentType })
188188
} else {
189189
// 5.11. Otherwise:

lib/web/fetch/headers.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function headerValueNormalize (potentialValue) {
3737
}
3838

3939
function fill (headers, object) {
40-
// To fill a Headers object headers with a given object, run these steps:
40+
// To fill a Headers object headers with a given object object, run these steps:
4141

4242
// 1. If object is a sequence, then for each header in object:
4343
// Note: webidl conversion to array has already been done.
@@ -205,7 +205,7 @@ class HeadersList {
205205
* @param {boolean} isLowerCase
206206
*/
207207
contains (name, isLowerCase) {
208-
// A header list contains a header name if list
208+
// A header list list contains a header name name if list
209209
// contains a header whose name is a byte-case-insensitive
210210
// match for name.
211211

@@ -433,7 +433,7 @@ class Headers {
433433

434434
// 2. If init is given, then fill this with init.
435435
if (init !== undefined) {
436-
init = webidl.converters.HeadersInit(init, 'Headers constructor', 'init')
436+
init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init')
437437
fill(this, init)
438438
}
439439
}

lib/web/fetch/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function fetch (input, init = undefined) {
196196
}
197197
)
198198

199-
// 12. Let handleFetchDone given response be to finalize and
199+
// 12. Let handleFetchDone given response response be to finalize and
200200
// report timing with response, globalObject, and "fetch".
201201
// see function handleFetchDone
202202

@@ -283,7 +283,7 @@ function finalizeAndReportTiming (response, initiatorType = 'other') {
283283

284284
// 8. If response’s timing allow passed flag is not set, then:
285285
if (!response.timingAllowPassed) {
286-
// 1. Set timingInfo to the result of creating an opaque timing info for timingInfo.
286+
// 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.
287287
timingInfo = createOpaqueTimingInfo({
288288
startTime: timingInfo.startTime
289289
})
@@ -1786,7 +1786,7 @@ async function httpNetworkFetch (
17861786

17871787
// 2. Otherwise, return a network error.
17881788

1789-
// To transmit request’s body, run these steps:
1789+
// To transmit request’s body body, run these steps:
17901790
let requestBody = null
17911791
// 1. If body is null and fetchParams’s process request end-of-body is
17921792
// non-null, then queue a fetch task given fetchParams’s process request

lib/web/fetch/response.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Response {
7171
return responseObject
7272
}
7373

74-
// Creates a redirect Response that redirects to url with status.
74+
// Creates a redirect Response that redirects to url with status status.
7575
static redirect (url, status = 302) {
7676
webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')
7777

@@ -333,7 +333,7 @@ Object.defineProperties(Response, {
333333

334334
// https://fetch.spec.whatwg.org/#concept-response-clone
335335
function cloneResponse (response) {
336-
// To clone a response, run these steps:
336+
// To clone a response response, run these steps:
337337

338338
// 1. If response is a filtered response, then return a new identical
339339
// filtered response whose internal response is a clone of response’s

lib/web/fetch/util.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function isValidHeaderValue (potentialValue) {
172172

173173
// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect
174174
function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
175-
// Given a request and a response actualResponse, this algorithm
175+
// Given a request request and a response actualResponse, this algorithm
176176
// updates request’s referrer policy according to the Referrer-Policy
177177
// header (if any) in actualResponse.
178178

@@ -881,7 +881,7 @@ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1)
881881
}
882882
}
883883

884-
// 11. Let pair be the entry in values at index.
884+
// 11. Let pair be the entry in values at index index.
885885
const { [keyIndex]: key, [valueIndex]: value } = values[index]
886886

887887
// 12. Set object’s index to index + 1.
@@ -1254,7 +1254,7 @@ function simpleRangeHeaderValue (value, allowWhitespace) {
12541254

12551255
// 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab
12561256
// or space, from data given position.
1257-
// Note from Khafra: it's the same step as in #8 again lol
1257+
// Note from Khafra: its the same step as in #8 again lol
12581258
if (allowWhitespace) {
12591259
collectASequenceOfCodePoints(
12601260
(char) => char === '\t' || char === ' ',

lib/web/fetch/webidl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ webidl.converters['long long'] = function (V, prefix, argument) {
522522
// 1. Let x be ? ConvertToInt(V, 64, "signed").
523523
const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument)
524524

525-
// 2. Return the IDL long value that represents
525+
// 2. Return the IDL long long value that represents
526526
// the same numeric value as x.
527527
return x
528528
}
@@ -532,7 +532,7 @@ webidl.converters['unsigned long long'] = function (V, prefix, argument) {
532532
// 1. Let x be ? ConvertToInt(V, 64, "unsigned").
533533
const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument)
534534

535-
// 2. Return the IDL unsigned long value that
535+
// 2. Return the IDL unsigned long long value that
536536
// represents the same numeric value as x.
537537
return x
538538
}

0 commit comments

Comments
 (0)