Skip to content

Instantly share code, notes, and snippets.

@ecarter
Created November 5, 2011 15:00
Show Gist options
  • Select an option

  • Save ecarter/1341628 to your computer and use it in GitHub Desktop.

Select an option

Save ecarter/1341628 to your computer and use it in GitHub Desktop.

Revisions

  1. ecarter created this gist Nov 5, 2011.
    4 changes: 4 additions & 0 deletions ext.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # get file extension from path
    ext = (path) ->
    index = path.lastIndexOf('.')
    extension = path.substr(index).replace('.', '')