Skip to content

Instantly share code, notes, and snippets.

@svlasov
Created May 10, 2012 10:42
Show Gist options
  • Save svlasov/2652368 to your computer and use it in GitHub Desktop.
Save svlasov/2652368 to your computer and use it in GitHub Desktop.
get basename part of a filename
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