Skip to content

Instantly share code, notes, and snippets.

@contra contra/stuff.coffee
Created Apr 24, 2012

Embed
What would you like to do?
Tiny window.location parser javascript/coffee-script
parseLocation = ->
out = {}
for key in window.location.search.substring(1).split "&"
pair = key.split "="
out[pair[0]] = pair[1]
return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.