mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10: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.
|
* @returns {Function} Returns the new partially applied function.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var defaultsDeep = _.partialRight(_.merge, _.defaults);
|
* var defaultsDeep = _.partialRight(_.merge, function deep(value, other) {
|
||||||
|
* return _.merge(value, other, deep);
|
||||||
|
* });
|
||||||
*
|
*
|
||||||
* var options = {
|
* var object = { 'a': { 'b': { 'c': 1 } } },
|
||||||
* 'variable': 'data',
|
* source = { 'a': { 'b': { 'c': 2, 'd': 2 } } };
|
||||||
* 'imports': { 'jq': $ }
|
|
||||||
* };
|
|
||||||
*
|
*
|
||||||
* defaultsDeep(options, _.templateSettings);
|
* defaultsDeep(object, source);
|
||||||
*
|
* // => { 'a': { 'b': { 'c': 1, 'd': 2 } } }
|
||||||
* options.variable
|
|
||||||
* // => 'data'
|
|
||||||
*
|
|
||||||
* options.imports
|
|
||||||
* // => { '_': _, 'jq': $ }
|
|
||||||
*/
|
*/
|
||||||
function partialRight(func) {
|
function partialRight(func) {
|
||||||
if (func) {
|
if (func) {
|
||||||
|
|||||||
Reference in New Issue
Block a user