Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
4f164f3adb44899a2dc93199d8750583ae4dae9f
/
.
/
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
;