Only adds a key to the object if the name is not empty and the value is defined
Only adds a key to the object if the name is not empty and the value is defined

This prevents “broken” key-value pairs in the resulting object.

kevindb/getUrlQueryString.js