docs: function getArguments(f, amended)
  {
    var functionCode = f.toString();
    if(amended){
      //This is a fix for when we are passed anonymous functions (which are passed to us as unassigned)
      //ex: "function (a, b, c) { }"
      //These are actually parse errors so we'll try adding an assignment to fix the parse error
      functionCode = 'var a=' + functionCode;
    }
    try{
      var ast = babylon.parse(functionCode);
      var functionDecl = findFunctionDecl(ast);
  
      if(!functionDecl) return [];
  
      return functionDecl.params.map(p => p.name);
    }catch(e){
      //try one more time
      if(!amended){
        return getArguments(f, true);
      }
  
      throw new Error('Could not parse:\n' + functionCode + '\n' + e);
    }
  }