File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,11 @@ server.tool(
164164 if ( jsonData . score && jsonData . score . overall !== undefined ) {
165165 const scoreEntries = Object . entries ( jsonData . score )
166166 . filter ( ( [ key ] ) => key !== 'overall' && key !== 'uuid' )
167- . map ( ( [ key , value ] ) => `${ key } : ${ value } ` )
167+ . map ( ( [ key , value ] ) => {
168+ const numValue = Number ( value )
169+ const displayValue = numValue <= 1 ? Math . round ( numValue * 100 ) : numValue
170+ return `${ key } : ${ displayValue } `
171+ } )
168172 . join ( ', ' )
169173
170174 results . push ( `${ purl } : ${ scoreEntries } ` )
@@ -178,7 +182,11 @@ server.tool(
178182 if ( jsonData . score && jsonData . score . overall !== undefined ) {
179183 const scoreEntries = Object . entries ( jsonData . score )
180184 . filter ( ( [ key ] ) => key !== 'overall' && key !== 'uuid' )
181- . map ( ( [ key , value ] ) => `${ key } : ${ value } ` )
185+ . map ( ( [ key , value ] ) => {
186+ const numValue = Number ( value )
187+ const displayValue = numValue <= 1 ? Math . round ( numValue * 100 ) : numValue
188+ return `${ key } : ${ displayValue } `
189+ } )
182190 . join ( ', ' )
183191
184192 results . push ( `${ purl } : ${ scoreEntries } ` )
You can’t perform that action at this time.
0 commit comments