export function filename(path: string) {
  const fileName = path.split('/').pop()
  if (!fileName) return { name: '', extension: '' }
  const fileNames = fileName.split('.')
  const extension = fileNames.pop()
  const name = fileNames.join('.')
  return { name, extension }
}
