(node)
| 367 | // falls back to node.version when the URL doesn't carry one. Do not |
| 368 | // use for policy matching. |
| 369 | const trustedDisplay = (node) => { |
| 370 | const trusted = getTrustedRegistryIdentity(node) |
| 371 | /* istanbul ignore next: defensive fallbacks for nodes without name/version */ |
| 372 | return { |
| 373 | name: (trusted && trusted.name) || node.name || null, |
| 374 | version: (trusted && trusted.version) || node.version || null, |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | module.exports = isScriptAllowed |
| 379 | module.exports.isScriptAllowed = isScriptAllowed |
no test coverage detected