Lodash _.unsplatl() Method
The Lodash _.unsplatl() method takes a function expecting an array as its first argument and returns a function that works identically, but takes a list of leading arguments. It is similar to the unsplat() method. It mimics the rest parameter syntax in ECMAScript 6.
_.unsplatl( function )
Parameters: This method accepts a single parameter as mentioned above and discussed below:
- function: It is the original function that takes its first argument as an array.
Return Value: This method returns a function.
Note: To execute the below examples, you have to install the lodash-contrib library by using this command prompt and execute the following command.
npm install lodash-contrib
A : 10, 20, 30, 40
[ 1, 2, 3, 4 ]
GeeksforGeeks : Computer Science Portal for Geeks