collectype

collectype v0.11.0


collectype / utils/pipe/pipeFunctions / parseMethodCall

Function: parseMethodCall()

parseMethodCall(raw): ParsedPipeStep

Defined in: utils/pipe/pipeFunctions.ts:49

Parses a method call string into a ParsedPipeStep object.

Parameters

raw

string

The raw method call string

Returns

ParsedPipeStep

ParsedPipeStep object

Throws

Error if the expression is invalid

Example

parseMethodCall('map(x => x * 2)');
// { methodName: 'map', args: ['x => x * 2'] }