Test name | Executions per second |
---|---|
split | 40784552.0 Ops/sec |
url | 1377064.4 Ops/sec |
<!--your preparation HTML code goes here-->
/*your preparation JavaScript code goes here
To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/
const url = 'https://www.marksandspencer.com/l/kids/girls/footwear/boots/fs5/chelsea-boots?test=test&foo=foo#something'
async function globalMeasureThatScriptPrepareFunction() {
// This function is optional, feel free to remove it.
// await someThing();
}
const [ parsedUrl ] = url.split('?');
const urlOb = new URL(url);
const parsedUrl = `${urlOb.origin}${urlOb.pathname}`