Skip to content

Instantly share code, notes, and snippets.

@bga
Created May 10, 2010 23:56
Show Gist options
  • Save bga/396713 to your computer and use it in GitHub Desktop.
Save bga/396713 to your computer and use it in GitHub Desktop.
var _propertyNameSanitize = (function()
{
var re = new RegExp(/-([a-z])/g);
var _replacer = function (str, cap) {
return cap.toUpperCase();
};
return function (propertyName) {
return propertyName.replace(re, _replacer);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment