@@ -227,22 +227,20 @@ function percentDecode (input) {
227
227
// 1. If byte is not 0x25 (%), then append byte to output.
228
228
if ( byte !== 0x25 ) {
229
229
output . push ( byte )
230
- }
231
230
232
231
// 2. Otherwise, if byte is 0x25 (%) and the next two bytes
233
232
// after byte in input are not in the ranges
234
233
// 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),
235
234
// and 0x61 (a) to 0x66 (f), all inclusive, append byte
236
235
// to output.
237
- else if (
236
+ } else if (
238
237
byte === 0x25 &&
239
238
! / ^ [ 0 - 9 A - F a - f ] { 2 } $ / i. test ( String . fromCharCode ( input [ i + 1 ] , input [ i + 2 ] ) )
240
239
) {
241
240
output . push ( 0x25 )
242
- }
243
241
244
242
// 3. Otherwise:
245
- else {
243
+ } else {
246
244
// 1. Let bytePoint be the two bytes after byte in input,
247
245
// decoded, and then interpreted as hexadecimal number.
248
246
const nextTwoBytes = String . fromCharCode ( input [ i + 1 ] , input [ i + 2 ] )
@@ -334,7 +332,7 @@ function parseMIMEType (input) {
334
332
// whitespace from input given position.
335
333
collectASequenceOfCodePoints (
336
334
// https://fetch.spec.whatwg.org/#http-whitespace
337
- ( char ) => / ( \u000A | \u000D | \u0009 | \u0020 ) / . test ( char ) ,
335
+ ( char ) => / ( \u000A | \u000D | \u0009 | \u0020 ) / . test ( char ) , // eslint-disable-line
338
336
input ,
339
337
position
340
338
)
@@ -389,10 +387,9 @@ function parseMIMEType (input) {
389
387
input ,
390
388
position
391
389
)
392
- }
393
390
394
391
// 9. Otherwise:
395
- else {
392
+ } else {
396
393
// 1. Set parameterValue to the result of collecting
397
394
// a sequence of code points that are not U+003B (;)
398
395
// from input, given position.
@@ -421,7 +418,7 @@ function parseMIMEType (input) {
421
418
parameterName . length !== 0 &&
422
419
/ ^ [ ! # $ % & ' * + - . ^ _ | ~ A - z 0 - 9 ] + $ / . test ( parameterName ) &&
423
420
// https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point
424
- ! / ^ ( \u0009 | \x { 0020 } - \x { 007 E} | \x { 0080 } - \x { 00 FF} ) + $ / . test ( parameterValue ) &&
421
+ ! / ^ ( \u0009 | \x { 0020 } - \x { 007 E} | \x { 0080 } - \x { 00 FF} ) + $ / . test ( parameterValue ) && // eslint-disable-line
425
422
! mimeType . parameters . has ( parameterName )
426
423
) {
427
424
mimeType . parameters . set ( parameterName , parameterValue )
@@ -436,7 +433,7 @@ function parseMIMEType (input) {
436
433
/** @param {string } data */
437
434
function forgivingBase64 ( data ) {
438
435
// 1. Remove all ASCII whitespace from data.
439
- data = data . replace ( / [ \u0009 \u000A \u000C \u000D \u0020 ] / g, '' )
436
+ data = data . replace ( / [ \u0009 \u000A \u000C \u000D \u0020 ] / g, '' ) // eslint-disable-line
440
437
441
438
// 2. If data’s code point length divides by 4 leaving
442
439
// no remainder, then:
@@ -529,10 +526,9 @@ function collectAnHTTPQuotedString (input, position, extractValue) {
529
526
530
527
// 3. Advance position by 1.
531
528
position . position ++
532
- }
533
529
534
530
// 6. Otherwise:
535
- else {
531
+ } else {
536
532
// 1. Assert: quoteOrBackslash is U+0022 (").
537
533
assert ( quoteOrBackslash === '"' )
538
534
0 commit comments