Skip to content

Instantly share code, notes, and snippets.

@miohtama
miohtama / parse-hash-bang-arguments-in-javascript.js
Created January 6, 2012 12:08
Parse hash bang HTTP GET query style arguments from an URL using Javascript
/**
* Parse hash bang parameters from a URL as key value object.
*
* For repeated parameters the last parameter is effective.
*
* If = syntax is not used the value is set to null.
*
* #x&y=3 -> { x:null, y:3 }
*
* @param aURL URL to parse or null if window.location is used