@@ -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()`.
3232const match = unpairedSurrogateRe . exec ( str ) ;
@@ -218,7 +218,7 @@ function onParseHashComplete(flags, protocol, username, password,
218218class URL {
219219constructor ( input , base ) {
220220// toUSVString is not needed.
221- input = '' + input ;
221+ input = ` ${ input } ` ;
222222if ( base !== undefined && ! ( base instanceof URL ) )
223223base = new URL ( base ) ;
224224parse ( this , input , base ) ;
@@ -329,7 +329,7 @@ Object.defineProperties(URL.prototype,{
329329} ,
330330set ( input ) {
331331// toUSVString is not needed.
332- input = '' + input ;
332+ input = ` ${ input } ` ;
333333parse ( this , input ) ;
334334}
335335} ,
@@ -348,7 +348,7 @@ Object.defineProperties(URL.prototype,{
348348} ,
349349set ( scheme ) {
350350// toUSVString is not needed.
351- scheme = '' + scheme ;
351+ scheme = ` ${ scheme } ` ;
352352if ( scheme . length === 0 )
353353return ;
354354binding . parse ( scheme , binding . kSchemeStart , null , this [ context ] ,
@@ -363,7 +363,7 @@ Object.defineProperties(URL.prototype,{
363363} ,
364364set ( username ) {
365365// toUSVString is not needed.
366- username = '' + username ;
366+ username = ` ${ username } ` ;
367367if ( ! this . hostname )
368368return ;
369369const ctx = this [ context ] ;
@@ -384,7 +384,7 @@ Object.defineProperties(URL.prototype,{
384384} ,
385385set ( password ) {
386386// toUSVString is not needed.
387- password = '' + password ;
387+ password = ` ${ password } ` ;
388388if ( ! this . hostname )
389389return ;
390390const ctx = this [ context ] ;
@@ -410,7 +410,7 @@ Object.defineProperties(URL.prototype,{
410410set ( host ) {
411411const ctx = this [ context ] ;
412412// toUSVString is not needed.
413- host = '' + host ;
413+ host = ` ${ host } ` ;
414414if ( this [ cannotBeBase ] ||
415415( this [ special ] && host . length === 0 ) ) {
416416// Cannot set the host if cannot-be-base is set or
@@ -435,7 +435,7 @@ Object.defineProperties(URL.prototype,{
435435set ( host ) {
436436const ctx = this [ context ] ;
437437// toUSVString is not needed.
438- host = '' + host ;
438+ host = ` ${ host } ` ;
439439if ( this [ cannotBeBase ] ||
440440( this [ special ] && host . length === 0 ) ) {
441441// Cannot set the host if cannot-be-base is set or
@@ -460,7 +460,7 @@ Object.defineProperties(URL.prototype,{
460460} ,
461461set ( port ) {
462462// toUSVString is not needed.
463- port = '' + port ;
463+ port = ` ${ port } ` ;
464464const ctx = this [ context ] ;
465465if ( ! ctx . host || this [ cannotBeBase ] ||
466466this . protocol === 'file:' )
@@ -484,7 +484,7 @@ Object.defineProperties(URL.prototype,{
484484} ,
485485set ( path ) {
486486// toUSVString is not needed.
487- path = '' + path ;
487+ path = ` ${ path } ` ;
488488if ( this [ cannotBeBase ] )
489489return ;
490490binding . parse ( path , binding . kPathStart , null , this [ context ] ,
@@ -533,7 +533,7 @@ Object.defineProperties(URL.prototype,{
533533set ( hash ) {
534534const ctx = this [ context ] ;
535535// toUSVString is not needed.
536- hash = '' + hash ;
536+ hash = ` ${ hash } ` ;
537537if ( this . protocol === 'javascript:' )
538538return ;
539539if ( ! hash ) {
@@ -1125,12 +1125,12 @@ function originFor(url, base){
11251125
11261126function domainToASCII ( domain ) {
11271127// toUSVString is not needed.
1128- return binding . domainToASCII ( '' + domain ) ;
1128+ return binding . domainToASCII ( ` ${ domain } ` ) ;
11291129}
11301130
11311131function domainToUnicode ( domain ) {
11321132// toUSVString is not needed.
1133- return binding . domainToUnicode ( '' + domain ) ;
1133+ return binding . domainToUnicode ( ` ${ domain } ` ) ;
11341134}
11351135
11361136// Utility function that converts a URL object into an ordinary
0 commit comments