lib/transformers/base.transformer.js
function getModuleBody(flapjack) {
    if (!flapjack) { return ''; }

    var str = flapjack.toString();
    var openingCurly = str.indexOf('{');
    var closingCurly = str.lastIndexOf('}');

    // if can't find the opening or closing curly, just return the entire string
    if (openingCurly < 0 || closingCurly < 0) {
        return str;
    }

    var body = str.substring(openingCurly + 1, closingCurly);
    return body.replace(/\n/g, '\n\t');
}
function getModuleBody(flapjack) {
    if (!flapjack) { return ''; }

    var str = flapjack.toString();
    var openingCurly = str.indexOf('{');
    var closingCurly = str.lastIndexOf('}');

    // if can't find the opening or closing curly, just return the entire string
    if (openingCurly < 0 || closingCurly < 0) {
        return str;
    }

    var body = str.substring(openingCurly + 1, closingCurly);
    return body.replace(/\n/g, '\n\t');
}
function getModuleBody ( flapjack ) { if ( ! flapjack ) { return '' ; } var str = flapjack . toString ( ) ; var openingCurly = str . indexOf ( '{' ) ; var closingCurly = str . lastIndexOf ( '}' ) ; // if can't find the opening or closing curly, just return the entire string if ( openingCurly < 0 || closingCurly < 0 ) { return str ; } var body = str . substring ( openingCurly + 1 , closingCurly ) ; return body . replace ( / \n / g , '\n\t' ) ; }
Get the core logic within a module without the function declaration,
parameters, etc. Essentially everything inside the curly brackets.
@param flapjack The pancakes module
@return {String}
Get the core logic within a module without the function declaration parameters etc . Essentially everything inside the curly brackets .