Last active
August 13, 2019 13:26
-
-
Save amarema/0b7a56d9837f9c71be32a2e51ca5e143 to your computer and use it in GitHub Desktop.
Get file extension
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
const getExtension = str => str.substring(str.lastIndexOf('.') + 1); | |
const str = getExtension('some.class.jsx'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment