phetsims / query-string-machine

Query String Machine is a query string parser that supports type coercion, default values & validation. No dependencies.
MIT License
3 stars 3 forks source link

getForString should start with ? or be blank #22

Closed samreid closed 7 years ago

samreid commented 7 years ago

During https://github.com/phetsims/phet-io/issues/694 @zepumph and I discovered that QSM.getForString must start with ? or be blank, to match the convention for window.location.search, so we decided to add an assertion to catch that problem.

samreid commented 7 years ago

We added the assert in my working copy, tested by launching FAMB in requirejs and it seems ok. We'll commit shortly.

samreid commented 7 years ago

Committed, and also tested lint. All seems ok, please reopen if there are other problems caused by this.