@@ -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 ) ;
@@ -215,7 +215,7 @@ function onParseHashComplete(flags, protocol, username, password,
215215class URL {
216216constructor ( input , base ) {
217217// toUSVString is not needed.
218- input = '' + input ;
218+ input = ` ${ input } ` ;
219219if ( base !== undefined && ! ( base instanceof URL ) )
220220base = new URL ( base ) ;
221221parse ( this , input , base ) ;
@@ -326,7 +326,7 @@ Object.defineProperties(URL.prototype,{
326326} ,
327327set ( input ) {
328328// toUSVString is not needed.
329- input = '' + input ;
329+ input = ` ${ input } ` ;
330330parse ( this , input ) ;
331331}
332332} ,
@@ -345,7 +345,7 @@ Object.defineProperties(URL.prototype,{
345345} ,
346346set ( scheme ) {
347347// toUSVString is not needed.
348- scheme = '' + scheme ;
348+ scheme = ` ${ scheme } ` ;
349349if ( scheme . length === 0 )
350350return ;
351351binding . parse ( scheme , binding . kSchemeStart , null , this [ context ] ,
@@ -360,7 +360,7 @@ Object.defineProperties(URL.prototype,{
360360} ,
361361set ( username ) {
362362// toUSVString is not needed.
363- username = '' + username ;
363+ username = ` ${ username } ` ;
364364if ( ! this . hostname )
365365return ;
366366const ctx = this [ context ] ;
@@ -381,7 +381,7 @@ Object.defineProperties(URL.prototype,{
381381} ,
382382set ( password ) {
383383// toUSVString is not needed.
384- password = '' + password ;
384+ password = ` ${ password } ` ;
385385if ( ! this . hostname )
386386return ;
387387const ctx = this [ context ] ;
@@ -407,7 +407,7 @@ Object.defineProperties(URL.prototype,{
407407set ( host ) {
408408const ctx = this [ context ] ;
409409// toUSVString is not needed.
410- host = '' + host ;
410+ host = ` ${ host } ` ;
411411if ( 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,{
432432set ( host ) {
433433const ctx = this [ context ] ;
434434// toUSVString is not needed.
435- host = '' + host ;
435+ host = ` ${ host } ` ;
436436if ( 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} ,
458458set ( port ) {
459459// toUSVString is not needed.
460- port = '' + port ;
460+ port = ` ${ port } ` ;
461461const ctx = this [ context ] ;
462462if ( ! ctx . host || this [ cannotBeBase ] ||
463463this . protocol === 'file:' )
@@ -481,7 +481,7 @@ Object.defineProperties(URL.prototype,{
481481} ,
482482set ( path ) {
483483// toUSVString is not needed.
484- path = '' + path ;
484+ path = ` ${ path } ` ;
485485if ( this [ cannotBeBase ] )
486486return ;
487487binding . parse ( path , binding . kPathStart , null , this [ context ] ,
@@ -530,7 +530,7 @@ Object.defineProperties(URL.prototype,{
530530set ( hash ) {
531531const ctx = this [ context ] ;
532532// toUSVString is not needed.
533- hash = '' + hash ;
533+ hash = ` ${ hash } ` ;
534534if ( this . protocol === 'javascript:' )
535535return ;
536536if ( ! 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