UNPKG
catan-client
Version:
latest (0.1.5)
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Settlers of Catan Client Implementation
github.com/ozthekoder/catan-client
ozthekoder/catan-client
catan-client
/
app
/
js
/
util
/
Util.js
8 lines
(7 loc)
•
228 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
"use strict"
;
module
.
exports
= {
hyphenToFunctionName
:
function
(
str
){
let
string
= str.
replace
(
/-([a-z])/g
,
function
(
g
) {
return
g[
1
].
toUpperCase
(); });
return
"on"
+
string
.
charAt
(
0
).
toUpperCase
() +
string
.
slice
(
1
); } }