You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
370 B
13 lines
370 B
'use strict' |
|
|
|
const isNamedCallback = require('./is-named-callback') |
|
|
|
function isCallingBack(node, exceptions) { |
|
const isCallExpression = node.type === 'CallExpression' |
|
const callee = node.callee || {} |
|
const nameIsCallback = isNamedCallback(callee.name, exceptions) |
|
const isCB = isCallExpression && nameIsCallback |
|
return isCB |
|
} |
|
|
|
module.exports = isCallingBack
|
|
|