mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Fix _.partialRight doc example. [ci skip] [closes #540]
This commit is contained in:
19
lodash.js
19
lodash.js
@@ -5415,20 +5415,15 @@
|
||||
* @returns {Function} Returns the new partially applied function.
|
||||
* @example
|
||||
*
|
||||
* var defaultsDeep = _.partialRight(_.merge, _.defaults);
|
||||
* var defaultsDeep = _.partialRight(_.merge, function deep(value, other) {
|
||||
* return _.merge(value, other, deep);
|
||||
* });
|
||||
*
|
||||
* var options = {
|
||||
* 'variable': 'data',
|
||||
* 'imports': { 'jq': $ }
|
||||
* };
|
||||
* var object = { 'a': { 'b': { 'c': 1 } } },
|
||||
* source = { 'a': { 'b': { 'c': 2, 'd': 2 } } };
|
||||
*
|
||||
* defaultsDeep(options, _.templateSettings);
|
||||
*
|
||||
* options.variable
|
||||
* // => 'data'
|
||||
*
|
||||
* options.imports
|
||||
* // => { '_': _, 'jq': $ }
|
||||
* defaultsDeep(object, source);
|
||||
* // => { 'a': { 'b': { 'c': 1, 'd': 2 } } }
|
||||
*/
|
||||
function partialRight(func) {
|
||||
if (func) {
|
||||
|
||||
Reference in New Issue
Block a user