mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
fix(jsdoc-parse): remove duplicative code
This commit is contained in:
parent
1983cda4e3
commit
7af5d1d55a
@ -75,15 +75,12 @@ function isConstructor(node) {
|
||||
return node.type === Syntax.MethodDefinition && node.kind === 'constructor';
|
||||
}
|
||||
|
||||
function isFunctionOrVariableDeclarator(node) {
|
||||
const { type } = node;
|
||||
|
||||
function isFunctionOrVariableDeclarator({ type }) {
|
||||
return (
|
||||
(type === Syntax.FunctionDeclaration ||
|
||||
type === Syntax.FunctionDeclaration ||
|
||||
type === Syntax.FunctionExpression ||
|
||||
type === Syntax.ArrowFunctionExpression ||
|
||||
type === Syntax.VariableDeclarator) &&
|
||||
node.enclosingScope
|
||||
type === Syntax.VariableDeclarator
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user