Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010599
render-attributes.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
422 B
Referenced Files
None
Subscribers
None
render-attributes.ts
View Options
import
{
attribute
}
from
"../sanitize.js"
;
export
function
renderAttributes
(
attrs
:
Record
<
string
,
string
|
boolean
>
)
{
const
ret
=
Object
.
entries
(
attrs
)
.
map
(([
key
,
value
])
=>
{
if
(
typeof
value
===
"boolean"
)
{
if
(
value
)
{
return
key
;
}
else
{
return
""
;
}
}
else
if
(
value
)
{
return
`
${
key
}
="
${
attribute
(
value
)
}
"`
;
}
else
{
return
""
;
}
})
.
join
(
" "
);
return
ret
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:44 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
624928
Default Alt Text
render-attributes.ts (422 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment