1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/eslint-plugin-promise/rules/lib/is-callback.js

14 lines
370 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
'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