(log)
| 343 | } |
| 344 | |
| 345 | function push(log) { |
| 346 | if ( |
| 347 | options.rows && |
| 348 | results.length >= options.rows && |
| 349 | options.order !== 'desc' |
| 350 | ) { |
| 351 | if (stream.readable) { |
| 352 | stream.destroy(); |
| 353 | } |
| 354 | return; |
| 355 | } |
| 356 | |
| 357 | if (options.fields) { |
| 358 | log = options.fields.reduce((obj, key) => { |
| 359 | obj[key] = log[key]; |
| 360 | return obj; |
| 361 | }, {}); |
| 362 | } |
| 363 | |
| 364 | if (options.order === 'desc') { |
| 365 | if (results.length >= options.rows) { |
| 366 | results.shift(); |
| 367 | } |
| 368 | } |
| 369 | results.push(log); |
| 370 | } |
| 371 | |
| 372 | function check(log) { |
| 373 | if (!log) { |
no outgoing calls
no test coverage detected