Sha256: 84f02fdca28f92a79610a62be71cde1b50fe5d5c0440b804b952d1414c7548de
Contents?: true
Size: 470 Bytes
Versions: 44
Compression:
Stored size: 470 Bytes
Contents
'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
Version data entries
44 entries across 44 versions & 2 rubygems