Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ada-url/js_url_benchmark into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Apr 25, 2023
2 parents a9cf18a + 7946928 commit 0647d34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bench_url.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { bench, run } from "mitata";
import { existsSync, createWriteStream, readFileSync, mkdirSync } from "node:fs";
import path from "node:path";
import axios from "axios";

const fixturesFolderPath = new URL('fixtures', import.meta.url).pathname;
Expand All @@ -14,7 +15,7 @@ const urls = [
];

function get_filename(url) {
return `fixtures/${url.substring(url.lastIndexOf("/") + 1)}`;
return `fixtures/${path.basename(url)}`;
}

async function downloadFile(url) {
Expand Down

0 comments on commit 0647d34

Please sign in to comment.