Skip to content

Instantly share code, notes, and snippets.

@droid001
Created January 25, 2016 09:29
Show Gist options
  • Save droid001/f8ef1b122ec5141c467d to your computer and use it in GitHub Desktop.
Save droid001/f8ef1b122ec5141c467d to your computer and use it in GitHub Desktop.
URL path key from the current location
const urlpathKey = window.location.pathname.replace(/^\//, '').split('/').shift();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment