Created
May 22, 2014 09:55
-
-
Save filippomangione/d8be3dd656076154ce98 to your computer and use it in GitHub Desktop.
Returns trailing name component of path.
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
var path = '/m/static/media/file-8861b49be6e21675f87b174cb824d79f.jpg'; | |
var basename = path.split(/[\\/]/).pop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment