scripts/build/shims/path.js/extname
export function extname(path) {
  const filename = basename(path);
  const dotIndex = filename.lastIndexOf(".");
  if (dotIndex === -1) {
    return "";
  }
  return filename.slice(dotIndex);
}