StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
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.
16 lines
470 B
16 lines
470 B
4 years ago
|
'use strict'
|
||
|
|
||
|
function isInsidePromise(node) {
|
||
|
const isFunctionExpression =
|
||
|
node.type === 'FunctionExpression' ||
|
||
|
node.type === 'ArrowFunctionExpression'
|
||
|
const parent = node.parent || {}
|
||
|
const callee = parent.callee || {}
|
||
|
const name = (callee.property && callee.property.name) || ''
|
||
|
const parentIsPromise = name === 'then' || name === 'catch'
|
||
|
const isInCB = isFunctionExpression && parentIsPromise
|
||
|
return isInCB
|
||
|
}
|
||
|
|
||
|
module.exports = isInsidePromise
|