Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F13522499
errors.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
342 B
Referenced Files
None
Subscribers
None
errors.js
View Options
import
{
capitalize
}
from
'lodash'
export
function
humanizeErrors
(
errors
)
{
return
Object
.
entries
(
errors
).
reduce
((
errs
,
[
k
,
val
])
=>
{
let
message
=
val
.
reduce
((
acc
,
message
)
=>
{
let
key
=
capitalize
(
k
.
replace
(
/_/g
,
' '
))
return
acc
+
[
key
,
message
].
join
(
' '
)
+
'. '
},
''
)
return
[...
errs
,
message
]
},
[])
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 9:07 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
696741
Default Alt Text
errors.js (342 B)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment