ReadonlycanonicalThe canonical parser function hook.
This property is automatically set and updated on a successful call of setHook.
ReadonlyhookThe parser function hook. This may be an alias of the canonical hook.
This property is read-only. To update it, use setHook.
Parameters of the instance. These are not automatically trimmed of leading and trailing whitespace.
Adds a parameter (to the end of the params array).
The new parameter.
Deletes a parameter.
The parameter index to delete.
Whether to shift the remaining parameters to the left after deletion. (Default: true)
true if the parameter was deleted, otherwise false.
Gets a parameter at the given index.
The index of the parameter to retrieve.
The parameter value, or null if no value is found at the specified index.
Checks if a parameter at the specified index exists, optionally matching its value.
The parameter index to match.
Optionalvalue: string | RegExpThe optional value matcher.
true if a matching parameter exists; otherwise, false.
Checks if a parameter exists based on a custom predicate function.
A function that tests each parameter.
true if a matching parameter exists; otherwise, false.
Sets a new function hook, overwriting the current one.
The new hook.
A boolean indicating whether the new hook was set.
Sets a parameter at the given index.
The new parameter.
The index of the parameter to update.
Options to set the new parameter.
Optionalifexist?: booleanWhether to set the parameter only if a parameter is already set at the specified index.
Optionaloverwrite?: booleanWhether to overwrite existing parameters. If false, the new parameter is not registered
if there is an existing parameter at the specified index. (Default: true)
A boolean indicating whether the new parameter has been set.
Stringifies the instance.
Optionaloptions: ParserFunctionOutputConfigOptions to format the output.
The parser function as a string.
The instance members of the
ParserFunctionclass. For static members, see ParserFunctionStatic (defined separately due to TypeScript limitations).