File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed
redisinsight/api/src/modules/browser/keys/scanner/strategies Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -171,21 +171,11 @@ export class StandaloneScannerStrategy extends ScannerStrategy {
171
171
: await this . getKeysType ( client , keys ) ;
172
172
const ttlResults = includeTTL ? await this . getKeysTtl ( client , keys ) : [ ] ;
173
173
174
- return keys . map (
175
- ( key : string , index : number ) : GetKeyInfoResponse => {
176
- const data : GetKeyInfoResponse = {
177
- name : key ,
178
- type : typeResults [ index ] ,
179
- }
180
-
181
- if ( includeTTL ) {
182
- data . ttl = ttlResults [ index ] ;
183
- }
184
- if ( includeSize ) {
185
- data . size = sizeResults [ index ] ;
186
- }
187
- return data ;
188
- } ,
189
- ) ;
174
+ return keys . map ( ( key , index ) => ( {
175
+ name : key ,
176
+ type : typeResults [ index ] ,
177
+ ...( includeTTL && { ttl : ttlResults [ index ] } ) ,
178
+ ...( includeSize && { size : sizeResults [ index ] } ) ,
179
+ } ) ) ;
190
180
}
191
- }
181
+ }
You can’t perform that action at this time.
0 commit comments