(displayNatives = false)
| 416 | } |
| 417 | |
| 418 | function formatScripts(displayNatives = false) { |
| 419 | function isVisible(script) { |
| 420 | if (displayNatives) return true; |
| 421 | return !script.isNative || isCurrentScript(script); |
| 422 | } |
| 423 | |
| 424 | return ArrayPrototypeJoin(ArrayPrototypeMap( |
| 425 | ArrayPrototypeFilter(ObjectValues(knownScripts), isVisible), |
| 426 | (script) => { |
| 427 | const isCurrent = isCurrentScript(script); |
| 428 | const { isNative, url } = script; |
| 429 | const name = `${getRelativePath(url)}${isNative ? ' <native>' : ''}`; |
| 430 | return `${isCurrent ? '*' : ' '} ${script.scriptId}: ${name}`; |
| 431 | }), '\n'); |
| 432 | } |
| 433 | |
| 434 | function listScripts(displayNatives = false) { |
| 435 | print(formatScripts(displayNatives)); |
no test coverage detected
searching dependent graphs…