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.
14 lines
370 B
14 lines
370 B
5 years ago
|
'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
|