UNPKG
expresss-ts
Version:
latest (1.0.7)
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
CLI to create an Express TypeScript starter project
expresss-ts
/
src
/
utils
/
example.utils.ts
8 lines
(6 loc)
•
234 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
export
const
capitalizeString = (
str
:
string
):
string
=>
{
return
str.
charAt
(
0
).
toUpperCase
() + str.
slice
(
1
).
toLowerCase
(); };
export
const
generateRandomId = ():
string
=>
{
return
Math
.
random
().
toString
(
36
).
substring
(
2
,
9
); };