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';
|
return node.type === Syntax.MethodDefinition && node.kind === 'constructor';
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFunctionOrVariableDeclarator(node) {
|
function isFunctionOrVariableDeclarator({ type }) {
|
||||||
const { type } = node;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(type === Syntax.FunctionDeclaration ||
|
type === Syntax.FunctionDeclaration ||
|
||||||
type === Syntax.FunctionExpression ||
|
type === Syntax.FunctionExpression ||
|
||||||
type === Syntax.ArrowFunctionExpression ||
|
type === Syntax.ArrowFunctionExpression ||
|
||||||
type === Syntax.VariableDeclarator) &&
|
type === Syntax.VariableDeclarator
|
||||||
node.enclosingScope
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user