UNPKG

eslint-plugin-mocha

Version:

Eslint rules for mocha.

10 lines 421 B
function isAnyFunctionExpression(node) { return node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; } export function getFunctionExpressionLastArgument(node) { const lastArgument = node.arguments.at(-1); return lastArgument !== undefined && isAnyFunctionExpression(lastArgument) ? lastArgument : undefined; } //# sourceMappingURL=function-expression-arguments.js.map