File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 55function format ( objURL ) {
66 let protocol = objURL . protocol || "" ;
77
8- if ( protocol && protocol . substr ( - 1 ) !== ":" ) {
8+ if ( protocol && ! protocol . endsWith ( ":" ) ) {
99 protocol += ":" ;
1010 }
1111
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function parseURL(resourceQuery) {
99 let options = { } ;
1010
1111 if ( typeof resourceQuery === "string" && resourceQuery !== "" ) {
12- const searchParams = resourceQuery . substr ( 1 ) . split ( "&" ) ;
12+ const searchParams = resourceQuery . slice ( 1 ) . split ( "&" ) ;
1313
1414 for ( let i = 0 ; i < searchParams . length ; i ++ ) {
1515 const pair = searchParams [ i ] . split ( "=" ) ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ describe("'Range' header", () => {
4242 ) ;
4343 expect ( responseRange . headers [ "content-length" ] ) . toBe ( "500" ) ;
4444 expect ( responseRange . headers [ "content-range" ] ) . toMatch ( / ^ b y t e s 0 - 4 9 9 \/ / ) ;
45- expect ( responseRange . text ) . toBe ( responseContent . substr ( 0 , 500 ) ) ;
45+ expect ( responseRange . text ) . toBe ( responseContent . slice ( 0 , 500 ) ) ;
4646 expect ( responseRange . text . length ) . toBe ( 500 ) ;
4747 } ) ;
4848
You can’t perform that action at this time.
0 commit comments