lib/annotation.helper.js
function getParameters(flapjack) {

    if (!_.isFunction(flapjack)) {
        throw new Error('Flapjack not a function ' + JSON.stringify(flapjack));
    }

    var str = flapjack.toString();
    var pattern = /(?:\()([^\)]*)(?:\))/;
    var matches = pattern.exec(str);

    if (matches === null || matches.length < 2) {
        throw new Error('Invalid flapjack: ' + str.substring(0, 200));
    }

    var unfiltered = matches[1].replace(/\s/g, '').split(',');
    var params = [], i;

    for (i = 0; i < unfiltered.length; i++) {
        if (unfiltered[i]) {
            params.push(unfiltered[i]);
        }
    }

    return params;
}
function getParameters(flapjack) {

    if (!_.isFunction(flapjack)) {
        throw new Error('Flapjack not a function ' + JSON.stringify(flapjack));
    }

    var str = flapjack.toString();
    var pattern = /(?:\()([^\)]*)(?:\))/;
    var matches = pattern.exec(str);

    if (matches === null || matches.length < 2) {
        throw new Error('Invalid flapjack: ' + str.substring(0, 200));
    }

    var unfiltered = matches[1].replace(/\s/g, '').split(',');
    var params = [], i;

    for (i = 0; i < unfiltered.length; i++) {
        if (unfiltered[i]) {
            params.push(unfiltered[i]);
        }
    }

    return params;
}
function getParameters ( flapjack ) { if ( ! _ . isFunction ( flapjack ) ) { throw new Error ( 'Flapjack not a function ' + JSON . stringify ( flapjack ) ) ; } var str = flapjack . toString ( ) ; var pattern = / (?:\()([^\)]*)(?:\)) / ; var matches = pattern . exec ( str ) ; if ( matches === null || matches . length < 2 ) { throw new Error ( 'Invalid flapjack: ' + str . substring ( 0 , 200 ) ) ; } var unfiltered = matches [ 1 ] . replace ( / \s / g , '' ) . split ( ',' ) ; var params = [ ] , i ; for ( i = 0 ; i < unfiltered . length ; i ++ ) { if ( unfiltered [ i ] ) { params . push ( unfiltered [ i ] ) ; } } return params ; }
Get the function parameters for a given pancakes module

@param flapjack The pancakes module
@return {Array}
Get the function parameters for a given pancakes module