Permalink
Browse files

withDot param for ctx.extname()

  • Loading branch information...
1 parent a1fe127 commit 7398fc94b74b30b94edf368f99b1f8d80624e371 @vol4ok committed May 1, 2012
Showing with 13 additions and 3 deletions.
  1. +4 −1 fs.walker.coffee
  2. +9 −2 fs.walker.js
View
@@ -33,7 +33,10 @@ class WalkerContext
basename(@path)
else
basename(@path).replace(/(\.[^.\/]*)?$/i, '')
- extname: -> extname(@path)
+ extname: (withDot = yes) ->
+ return if withDot
+ then extname(@path)
+ else extname(@path).slice(1)
subpath: -> dirname(@_subpath)
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 7398fc9

Please sign in to comment.