UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

16 lines (14 loc) 439 B
/** * @file Check if node is awaited * @description Single responsibility: Check if an AST node is wrapped in an await expression */ /** * Check if a node is awaited * @param {Object} node - AST node * @param {Object} parent - Parent AST node * @returns {boolean} True if awaited */ function isAwaited(node, parent) { return parent && parent.type === 'AwaitExpression' && parent.argument === node; } module.exports = isAwaited;