// packages/url/src/get-filename.ts
function getFilename(url) {
  let filename;
  if (!url) {
    return;
  }
  try {
    filename = new URL(url, "http://example.com").pathname.split("/").pop();
  } catch (error) {
  }
  if (filename) {
    return filename;
  }
}
export {
  getFilename
};
//# sourceMappingURL=get-filename.mjs.map
