UNPKG
@hosoft/restful-api-framework
Version:
latest (2.2.0)
2.2.0
2.1.0
2.0.8
2.0.7
2.0.5
2.0.2
2.0.1
1.5.3
1.4.1
1.3.0
1.2.0
1.1.0
1.0.1
Base framework of the headless cms HoServer provided by http://helloreact.cn
@hosoft/restful-api-framework
/
src
/
utils
/
common.js
14 lines
(11 loc)
•
271 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
{
v4
: uuidV4 } =
require
(
'uuid'
)
const
wrapper = {
capitalizeFirstLetter
(
str
) {
if
(!str)
return
''
return
str.
charAt
(
0
).
toUpperCase
() + str.
slice
(
1
) },
getTempFile
(
) {
return
uuidV4
() +
'.tmp'
} }
module
.
exports
= wrapper