UNPKG
megaera
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.0.3
0.0.2
0.0.1
0.0.0
GraphQL to TypeScript Generator
github.com/webpod/graphql-megaera
webpod/graphql-megaera
megaera
/
dist
/
utils.js
7 lines
(6 loc)
•
236 B
JavaScript
View Raw
1
2
3
4
5
6
7
export
function
firstLetterUpper
(
string
)
{
return
string
.
charAt
(
0
).
toUpperCase
() +
string
.
slice
(
1
); } export
function
plural
(
count, singular, plural
)
{
return
(count ===
1
? singular : plural).
replace
(
'%d'
, count.
toString
()); }