@@ -26,7 +26,7 @@ const IteratorPrototype = Object.getPrototypeOf(
2626const unpairedSurrogateRe =
2727 / ( [ ^ \uD800 - \uDBFF ] | ^ ) [ \uDC00 - \uDFFF ] | [ \uD800 - \uDBFF ] (? ! [ \uDC00 - \uDFFF ] ) / ;
2828function toUSVString ( val ) {
29- const str = '' + val ;
29+ const str = ` ${ val } ` ;
3030 // As of V8 5.5, `str.search()` (and `unpairedSurrogateRe[@@search]()`) are
3131 // slower than `unpairedSurrogateRe.exec()`.
3232 const match = unpairedSurrogateRe . exec ( str ) ;
@@ -215,7 +215,7 @@ function onParseHashComplete(flags, protocol, username, password,
215215class URL {
216216 constructor ( input , base ) {
217217 // toUSVString is not needed.
218- input = '' + input ;
218+ input = ` ${ input } ` ;
219219 if ( base !== undefined && ! ( base instanceof URL ) )
220220 base = new URL ( base ) ;
221221 parse ( this , input , base ) ;
@@ -326,7 +326,7 @@ Object.defineProperties(URL.prototype, {
326326 } ,
327327 set ( input ) {
328328 // toUSVString is not needed.
329- input = '' + input ;
329+ input = ` ${ input } ` ;
330330 parse ( this , input ) ;
331331 }
332332 } ,
@@ -345,7 +345,7 @@ Object.defineProperties(URL.prototype, {
345345 } ,
346346 set ( scheme ) {
347347 // toUSVString is not needed.
348- scheme = '' + scheme ;
348+ scheme = ` ${ scheme } ` ;
349349 if ( scheme . length === 0 )
350350 return ;
351351 binding . parse ( scheme , binding . kSchemeStart , null , this [ context ] ,
@@ -360,7 +360,7 @@ Object.defineProperties(URL.prototype, {
360360 } ,
361361 set ( username ) {
362362 // toUSVString is not needed.
363- username = '' + username ;
363+ username = ` ${ username } ` ;
364364 if ( ! this . hostname )
365365 return ;
366366 const ctx = this [ context ] ;
@@ -381,7 +381,7 @@ Object.defineProperties(URL.prototype, {
381381 } ,
382382 set ( password ) {
383383 // toUSVString is not needed.
384- password = '' + password ;
384+ password = ` ${ password } ` ;
385385 if ( ! this . hostname )
386386 return ;
387387 const ctx = this [ context ] ;
@@ -407,7 +407,7 @@ Object.defineProperties(URL.prototype, {
407407 set ( host ) {
408408 const ctx = this [ context ] ;
409409 // toUSVString is not needed.
410- host = '' + host ;
410+ host = ` ${ host } ` ;
411411 if ( this [ cannotBeBase ] ||
412412 ( this [ special ] && host . length === 0 ) ) {
413413 // Cannot set the host if cannot-be-base is set or
@@ -432,7 +432,7 @@ Object.defineProperties(URL.prototype, {
432432 set ( host ) {
433433 const ctx = this [ context ] ;
434434 // toUSVString is not needed.
435- host = '' + host ;
435+ host = ` ${ host } ` ;
436436 if ( this [ cannotBeBase ] ||
437437 ( this [ special ] && host . length === 0 ) ) {
438438 // Cannot set the host if cannot-be-base is set or
@@ -457,7 +457,7 @@ Object.defineProperties(URL.prototype, {
457457 } ,
458458 set ( port ) {
459459 // toUSVString is not needed.
460- port = '' + port ;
460+ port = ` ${ port } ` ;
461461 const ctx = this [ context ] ;
462462 if ( ! ctx . host || this [ cannotBeBase ] ||
463463 this . protocol === 'file:' )
@@ -481,7 +481,7 @@ Object.defineProperties(URL.prototype, {
481481 } ,
482482 set ( path ) {
483483 // toUSVString is not needed.
484- path = '' + path ;
484+ path = ` ${ path } ` ;
485485 if ( this [ cannotBeBase ] )
486486 return ;
487487 binding . parse ( path , binding . kPathStart , null , this [ context ] ,
@@ -530,7 +530,7 @@ Object.defineProperties(URL.prototype, {
530530 set ( hash ) {
531531 const ctx = this [ context ] ;
532532 // toUSVString is not needed.
533- hash = '' + hash ;
533+ hash = ` ${ hash } ` ;
534534 if ( this . protocol === 'javascript:' )
535535 return ;
536536 if ( ! hash ) {
@@ -1122,12 +1122,12 @@ function originFor(url, base) {
11221122
11231123function domainToASCII ( domain ) {
11241124 // toUSVString is not needed.
1125- return binding . domainToASCII ( '' + domain ) ;
1125+ return binding . domainToASCII ( ` ${ domain } ` ) ;
11261126}
11271127
11281128function domainToUnicode ( domain ) {
11291129 // toUSVString is not needed.
1130- return binding . domainToUnicode ( '' + domain ) ;
1130+ return binding . domainToUnicode ( ` ${ domain } ` ) ;
11311131}
11321132
11331133// Utility function that converts a URL object into an ordinary
0 commit comments