Skip to content

Instantly share code, notes, and snippets.

@ecarter
Created November 5, 2011 15:00
get file extension from path in coffeescript
# get file extension from path
ext = (path) ->
index = path.lastIndexOf('.')
extension = path.substr(index).replace('.', '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment