eslint-plugin-mocha
Version:
Eslint rules for mocha.
43 lines • 1.34 kB
JavaScript
export function isMemberExpression(node) {
return node.type === 'MemberExpression';
}
export function isCallExpression(node) {
return node.type === 'CallExpression';
}
export function isBlockStatement(node) {
return node.type === 'BlockStatement';
}
export function isReturnStatement(node) {
return node.type === 'ReturnStatement';
}
export function isIdentifier(node) {
return node.type === 'Identifier';
}
export function isVariableDeclarator(node) {
return node.type === 'VariableDeclarator';
}
export function isObjectPattern(pattern) {
return pattern.type === 'ObjectPattern';
}
export function isIdentifierPattern(pattern) {
return pattern.type === 'Identifier';
}
export function isAssignmentProperty(property) {
return property.type === 'Property';
}
export function isArrowFunctionExpression(node) {
return node.type === 'ArrowFunctionExpression';
}
export function isFunctionExpression(node) {
return node.type === 'FunctionExpression';
}
export function isFunctionDeclaration(node) {
return node.type === 'FunctionDeclaration';
}
export function isFunction(node) {
return isFunctionExpression(node) || isArrowFunctionExpression(node) || isFunctionDeclaration(node);
}
export function isLiteral(node) {
return node.type === 'Literal';
}
//# sourceMappingURL=node-types.js.map