@eagleoutice/flowr - v2.13.14
    Preparing search index...
    • Matches the arguments against a parameter specification, returning the arguments bound to each target. Unlike linkArgumentsOnCall this touches no graph, so it also works for a specification without parameters in the AST.

      Type Parameters

      Parameters

      Returns Map<Targets, NodeId[]>

      const parameterSpec = {
      'paramName': 'paramId',
      'anotherParamName': 'anotherParamId',
      // we recommend to always add '...' to your specification
      // this way you can collect all arguments that could not be matched!
      '...': '...'
      } as const;

      const match = pMatch(convertFnArguments(args), parameterSpec);
      const addParam = match.get('paramId');

      To obtain the arguments from a RFunctionCall[], either use processAllArguments (also available via processKnownFunctionCall) or convert them with convertFnArguments.