Returns the file extension
absolute, relative, or URL path to a file
the extension name in lowercase and without any dot prefix
This convenience function is primarily used to guess the 'as' attribute of a link preload/prefetch behind the scene.
fileExt('file.txt') // => 'txt'fileExt('https://www.alexewerlof.com/path/to/file.js') // => 'js' Copy
fileExt('file.txt') // => 'txt'fileExt('https://www.alexewerlof.com/path/to/file.js') // => 'js'
If path is not a string.
Returns the file extension