Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
5d1908eea07e351cfb131d7ac7f4d17fb5bf25d5
/
.
/
src
/
utils
/
generateKeyValueList.ts
blob: 7f77bef587a998ff00ce8d3d910853b5e79d60b8 [
file
] [
log
] [
blame
]
function
capitalize
(
s
)
{
return
s
[
0
].
toUpperCase
()
+
s
.
slice
(
1
);
}
function
keyValueList
(
data
)
{
let
out
=
""
;
Object
.
entries
(
data
).
map
(([
key
,
value
])
=>
{
out
+=
`**${capitalize(key)}:** ${value}\n`
})
return
out
;
}
export
default
keyValueList
;