(node)
| 52 | const cryptoKeyConstructorNames = new Set(['CryptoKey']); |
| 53 | |
| 54 | function registerRequire(node) { |
| 55 | if (!isKeyModuleRequire(node.init)) return; |
| 56 | |
| 57 | if (node.id.type === 'Identifier') { |
| 58 | namespaceNames.add(node.id.name); |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | if (node.id.type !== 'ObjectPattern') return; |
| 63 | |
| 64 | for (const property of node.id.properties) { |
| 65 | if (property.type !== 'Property') continue; |
| 66 | const keyName = property.key.name ?? property.key.value; |
| 67 | if (property.value.type !== 'Identifier') continue; |
| 68 | const localName = property.value.name; |
| 69 | if (keyObjectClassNames.has(keyName)) { |
| 70 | keyObjectConstructorNames.add(localName); |
| 71 | } else if (cryptoKeyClassNames.has(keyName)) { |
| 72 | cryptoKeyConstructorNames.add(localName); |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | function constructorKind(node) { |
| 78 | if (node.type === 'Identifier') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…