index.js
function getFunctionCalls(call, functionRE) {
  var expressions = []

  var fnRE = typeof functionRE === "string" ? new RegExp("\\b(" + functionRE + ")\\(") : functionRE
  do {
    var searchMatch = fnRE.exec(call)
    if (!searchMatch) {
      return expressions
    }
    if (searchMatch[1] === undefined) {
      throw new Error("Missing the first couple of parenthesis to get the function identifier in " + functionRE)
    }
    var fn = searchMatch[1]
    var startIndex = searchMatch.index
    var matches = balanced("(", ")", call.substring(startIndex))

    if (!matches || matches.start !== searchMatch[0].length - 1) {
      throw new SyntaxError(fn + "(): missing closing ')' in the value '" + call + "'")
    }

    expressions.push({matches: matches, functionIdentifier: fn})
    call = matches.post
  }
  while (fnRE.test(call))

  return expressions
}
function getFunctionCalls(call, functionRE) {
  var expressions = []

  var fnRE = typeof functionRE === "string" ? new RegExp("\\b(" + functionRE + ")\\(") : functionRE
  do {
    var searchMatch = fnRE.exec(call)
    if (!searchMatch) {
      return expressions
    }
    if (searchMatch[1] === undefined) {
      throw new Error("Missing the first couple of parenthesis to get the function identifier in " + functionRE)
    }
    var fn = searchMatch[1]
    var startIndex = searchMatch.index
    var matches = balanced("(", ")", call.substring(startIndex))

    if (!matches || matches.start !== searchMatch[0].length - 1) {
      throw new SyntaxError(fn + "(): missing closing ')' in the value '" + call + "'")
    }

    expressions.push({matches: matches, functionIdentifier: fn})
    call = matches.post
  }
  while (fnRE.test(call))

  return expressions
}
function getFunctionCalls ( call , functionRE ) { var expressions = [ ] var fnRE = typeof functionRE === "string" ? new RegExp ( "\\b(" + functionRE + ")\\(" ) : functionRE do { var searchMatch = fnRE . exec ( call ) if ( ! searchMatch ) { return expressions } if ( searchMatch [ 1 ] === undefined ) { throw new Error ( "Missing the first couple of parenthesis to get the function identifier in " + functionRE ) } var fn = searchMatch [ 1 ] var startIndex = searchMatch . index var matches = balanced ( "(" , ")" , call . substring ( startIndex ) ) if ( ! matches || matches . start !== searchMatch [ 0 ] . length - 1 ) { throw new SyntaxError ( fn + "(): missing closing ')' in the value '" + call + "'" ) } expressions . push ( { matches : matches , functionIdentifier : fn } ) call = matches . post } while ( fnRE . test ( call ) ) return expressions }
Parses expressions in a value

@param {String} value
@returns {Array}
@api private
Parses expressions in a value