The _.bindKey() method of Function in lodash is used to create a function which calls the method at the object[key] along with the partials added to the arguments it accepts.
- This method is different from the _.bind() method as it permits bound functions to mention methods that may be reinterpreted or does not still exist.
- The _.bindKey.placeholder value that is by default ( _ ) in monolithic builds which is utilized as a placeholder for partially used arguments.
_.bindKey( object, key, partials )
Parameters: This method accepts three parameters as mentioned above and described below:
- object: It is the object which is used to call the method on.
- key: It is the key to be used in the method.
- partials: It is the arguments which is to be partially applied. It is an optional parameter.
Return Value: This method returns the new bound function.
Example 2: Using a bound with the placeholder.
Welcome to GeeksforGeeks!
- Lodash _.method() Method
- Lodash _.sneq() Method
- Lodash _.toQuery() Method
- Lodash _.uniqWith() Method
- Lodash _.xorWith() Method
- Lodash | _.head() Method
- Lodash | _.remove() Method
- Lodash | _.pullAt() Method
- Lodash | _.pullAll() Method
- Lodash | _.pull() Method
- Lodash | _.nth() Method
- Lodash | _.takeRight() Method
- Lodash | _.take() Method
- Lodash | _.sortedLastIndex() Method
- Lodash | _.fromPairs() Method
- Lodash | _.differenceWith() Method
- Lodash | _.castArray() Method
- Lodash | _.cloneDeep() Method
- Lodash | _.clone() Method
- Lodash | _.sampleSize() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.