neocotic/template — Issue #66: Ensure template data is lower case
Author: neocotic
Created: 2012-02-13 07:57:42+00:00
State: open
Labels: framework, javascript

I just noticed that some properties of the template data created by [jQuery URL Parser](https://github.com/allmarkedup/jQuery-URL-Parser) is not in lower case (e.g. `userInfo`).

**Solution:** After building the data object, iterate over the data object and create a lower case version of any properties containing upper case characters (do not delete the original in case it's required internally by another framework.

``` coffeescript
for own key, value of data where /[A-Z]+/.test key
data[key.toLowerCase()] = value
```