src/util/astUtil.js
function getValueReturnedInFirstStatement(func) {
    const firstLine = getFirstFunctionLine(func)
    if (func) {
        if (isFunctionDefinitionWithBlock(func)) {
            return isReturnStatement(firstLine) ? firstLine.argument : undefined
        }
        if (func.type === 'ArrowFunctionExpression') {
            return firstLine
        }
    }
}
function getValueReturnedInFirstStatement(func) {
    const firstLine = getFirstFunctionLine(func)
    if (func) {
        if (isFunctionDefinitionWithBlock(func)) {
            return isReturnStatement(firstLine) ? firstLine.argument : undefined
        }
        if (func.type === 'ArrowFunctionExpression') {
            return firstLine
        }
    }
}
function getValueReturnedInFirstStatement ( func ) { const firstLine = getFirstFunctionLine ( func ) if ( func ) { if ( isFunctionDefinitionWithBlock ( func ) ) { return isReturnStatement ( firstLine ) ? firstLine . argument : undefined } if ( func . type === 'ArrowFunctionExpression' ) { return firstLine } } }
Returns the node of the value returned in the first line, if any
@param {Object} func
@returns {Object|undefined}
Returns the node of the value returned in the first line if any