We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfde906 commit 6b0191cCopy full SHA for 6b0191c
json-to-go.js
@@ -104,7 +104,7 @@ function jsonToGo(json, typename)
104
'8': "Eight_", '9': "Nine_"};
105
str = numbers[str.charAt(0)] + str.substr(1);
106
}
107
- return toProperCase(str).replace(/\s|_/g, "");
+ return toProperCase(str).replace(/\s|_|-/g, "");
108
109
110
function goType(val)
@@ -159,7 +159,7 @@ function jsonToGo(json, typename)
159
160
str = str.charAt(0).toUpperCase() + str.substr(1);
161
162
- return str.replace(/[\s_][a-z]+/g, function(txt)
+ return str.replace(/[\s_-][a-z]+/g, function(txt)
163
{
164
return txt.charAt(0)
165
+ txt.charAt(1).toUpperCase()
0 commit comments