Examples
getFileName('/assets/hero.sprite.png') // 'hero'
getFileName('README') // 'README'Function
getFileName(url: string): stringReturns the text before the first dot in the final slash-delimited segment.
This is a lightweight string helper, not a URL or filesystem parser. It
treats only / as a separator, keeps query strings intact, and returns an
empty string for an empty input, a trailing slash, or a final segment that
starts with a dot.
getFileName('/assets/hero.sprite.png') // 'hero'
getFileName('README') // 'README'