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(
164
164
if ( jsonData . score && jsonData . score . overall !== undefined ) {
165
165
const scoreEntries = Object . entries ( jsonData . score )
166
166
. 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
+ } )
168
172
. join ( ', ' )
169
173
170
174
results . push ( `${ purl } : ${ scoreEntries } ` )
@@ -178,7 +182,11 @@ server.tool(
178
182
if ( jsonData . score && jsonData . score . overall !== undefined ) {
179
183
const scoreEntries = Object . entries ( jsonData . score )
180
184
. 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
+ } )
182
190
. join ( ', ' )
183
191
184
192
results . push ( `${ purl } : ${ scoreEntries } ` )
You can’t perform that action at this time.
0 commit comments