From 40809e40c2487ae1c341b9c7302d4cc157c3eb09 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 2 May 2014 22:33:17 -0700 Subject: [PATCH] Fix `_.partialRight` doc example. [ci skip] [closes #540] --- lodash.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lodash.js b/lodash.js index e8cecde4e..d30160081 100644 --- a/lodash.js +++ b/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) {