partialRight es-toolkit
Creates a new function with some parameters pre-applied from the right.
Usage
partialRight(func, ...args)
Use partialRight when you want to fix some parameters of a function from the right. Opposite to partial, pre-provided parameters are placed at the back of the function, and parameters passed later are added to the front.
This is useful when you want to fix the last parameters and dynamically change only the front parameters.
You can use partialRight.placeholder to pass specific parameters later.
You can adjust the parameter order using placeholders.
Parameters
The function to partially apply parameters to.
The parameters to pre-apply from the right.
Returns
Returns a new function with some parameters pre-applied from the right.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.