Created
May 10, 2012 10:42
-
-
Save svlasov/2652368 to your computer and use it in GitHub Desktop.
get basename part of a filename
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function basename(path) { | |
return path.replace(/\\/g,'/').replace( /.*\//, '' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment