* @param {babel.NodePath} path * @return {boolean}
(path)
| 237 | * @return {boolean} |
| 238 | */ |
| 239 | function isReferenceToObjectKeyList(path) { |
| 240 | const {parentPath} = path; |
| 241 | if (parentPath?.isMemberExpression() && path.key === 'object') { |
| 242 | return ( |
| 243 | t.isIdentifier(parentPath.node.property, {name: 'hasOwnProperty'}) && |
| 244 | parentPath.parentPath?.isCallExpression() |
| 245 | ); |
| 246 | } |
| 247 | if ( |
| 248 | parentPath?.isCallExpression() && |
| 249 | parentPath.node.arguments[0] === path.node |
| 250 | ) { |
| 251 | const callee = parentPath.get('callee'); |
| 252 | return ( |
| 253 | isMemberExpressionLeftwards(callee, ['Object', 'keys']) || |
| 254 | isMemberExpressionLeftwards(callee, [ |
| 255 | 'Object', |
| 256 | 'prototype', |
| 257 | 'hasOwnProperty', |
| 258 | 'call', |
| 259 | ]) |
| 260 | ); |
| 261 | } |
| 262 | return false; |
| 263 | } |
| 264 | |
| 265 | /** @type {{[stringified: string]: string}} */ |
| 266 | const valueReferences = {}; |
nothing calls this directly
no test coverage detected