title: Is there a simple/fast way to map "data-" attributes to mixed-case property names?
body: <p>I have a base plugin class I use as the basis of all my jQuery plugins. It is similar to the jQuery UI widget, but does a lot more heavy lifting for me.</p>
  
  <p>I now wish to map <code>data-</code> attribute values, from the attached element, into any options passed to the plugin. This will allow the plugin to not only take the typical <code>options</code> object, but also allow data-driven override values on individual elements (a common requirement).</p>
  
  <p>The problem I have is that my option properties are typically mixed case e.g. <code>MaxHeight</code>, but apparently the HTML specification <em>only allows lowercase characters</em> into <code>data-</code> attribute names.</p>
  
  <p>As an example testbed: <a href="http://jsfiddle.net/TrueBlueAussie/tfkrwq09/1/" rel="nofollow">http://jsfiddle.net/TrueBlueAussie/tfkrwq09/1/</a></p>
  
  <p><strong>HTML:</strong> </p>
  
  <pre><code>&lt;div id="test" data-DataTest="test2"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>var object = {
      DataTest: 123
  };
  $.each($('#test').data(), function (k, v) {
      object[k] = v;
  });
  
  console.log(object.datatest); // test
  console.log(object.DataTest); // 123
  </code></pre>
  
  <p>Desired result:</p>
  
  <pre><code>console.log(object.datatest); // undefined
  console.log(object.DataTest); // test
  </code></pre>
  
  <p>I am after ways to map <code>data-</code> attributes to mixed-case properties, while retaining the current speed and simplicity (if possible).</p>