src/util/astUtil.js
function hasOnlyOneStatement(func) {
    if (isFunctionDefinitionWithBlock(func)) {
        return _.get(func, 'body.body.length') === 1
    }
    if (func.type === 'ArrowFunctionExpression') {
        return !_.get(func, 'body.body')
    }
}
function hasOnlyOneStatement(func) {
    if (isFunctionDefinitionWithBlock(func)) {
        return _.get(func, 'body.body.length') === 1
    }
    if (func.type === 'ArrowFunctionExpression') {
        return !_.get(func, 'body.body')
    }
}
function hasOnlyOneStatement ( func ) { if ( isFunctionDefinitionWithBlock ( func ) ) { return _ . get ( func , 'body.body.length' ) === 1 } if ( func . type === 'ArrowFunctionExpression' ) { return ! _ . get ( func , 'body.body' ) } }
Returns whether the node specified has only one statement
@param {Object} func
@returns {boolean}
Returns whether the node specified has only one statement