src/utils/functions.js
function getParamNames(fn) {
        var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
        var fnString = fn.toString().replace(STRIP_COMMENTS, '');
        var result = fnString.slice(fnString.indexOf('(') + 1, fnString.indexOf(')')).match(/([^\s,]+)/g);
        return result || [];
    }
function getParamNames(fn) {
        var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
        var fnString = fn.toString().replace(STRIP_COMMENTS, '');
        var result = fnString.slice(fnString.indexOf('(') + 1, fnString.indexOf(')')).match(/([^\s,]+)/g);
        return result || [];
    }
function getParamNames ( fn ) { var STRIP_COMMENTS = / ((\/\/.*$)|(\/\*[\s\S]*?\*\/)) / mg ; var fnString = fn . toString ( ) . replace ( STRIP_COMMENTS , '' ) ; var result = fnString . slice ( fnString . indexOf ( '(' ) + 1 , fnString . indexOf ( ')' ) ) . match ( / ([^\s,]+) / g ) ; return result || [ ] ; }
This method returns an array listing the names of the parameters of the given function. The array is empty if the
function does not expect any parameter.

@param {function} fn the function to retrieve the parameters names for
@returns {Array|{index: number, input: string}} an array listing the names of the parameters of the given
function, or an empty array if the function does not expect any parameter
This method returns an array listing the names of the parameters of the given function . The array is empty if the function does not expect any parameter .