mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Cleanup doc examples of _.isEqualWith, _.isMatchWith, & _.setWith. [ci skip]
This commit is contained in:
22
lodash.js
22
lodash.js
@@ -7978,7 +7978,8 @@
|
|||||||
* var other = ['hi', 'goodbye'];
|
* var other = ['hi', 'goodbye'];
|
||||||
*
|
*
|
||||||
* _.isEqualWith(array, other, function(value, other) {
|
* _.isEqualWith(array, other, function(value, other) {
|
||||||
* if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
|
* var reHello = /^h(?:i|ello)$/;
|
||||||
|
* if (reHello.test(value) && reHello.test(other)) {
|
||||||
* return true;
|
* return true;
|
||||||
* }
|
* }
|
||||||
* });
|
* });
|
||||||
@@ -8139,8 +8140,11 @@
|
|||||||
* var object = { 'greeting': 'hello' };
|
* var object = { 'greeting': 'hello' };
|
||||||
* var source = { 'greeting': 'hi' };
|
* var source = { 'greeting': 'hi' };
|
||||||
*
|
*
|
||||||
* _.isMatch(object, source, function(value, other) {
|
* _.isMatchWith(object, source, function(value, other) {
|
||||||
* return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;
|
* var reHello = /^h(?:i|ello)$/;
|
||||||
|
* if (reHello.test(value) && reHello.test(other)) {
|
||||||
|
* return true;
|
||||||
|
* }
|
||||||
* });
|
* });
|
||||||
* // => true
|
* // => true
|
||||||
*/
|
*/
|
||||||
@@ -9418,10 +9422,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is like `_.set` except that it accepts `customizer` which
|
* This method is like `_.set` except that it accepts `customizer` which is
|
||||||
* is invoked to produce the namespace objects of `path`. If `customizer`
|
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
|
||||||
* returns `undefined` namespace creation is handled by the method instead.
|
* path creation is handled by the method instead. The `customizer` is invoked
|
||||||
* The `customizer` is invoked with three arguments: (nsValue, key, nsObject).
|
* with three arguments: (nsValue, key, nsObject).
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -9434,7 +9438,9 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.setWith({ '0': {} }, '[0][1][2]', 3, function(value) {
|
* _.setWith({ '0': {} }, '[0][1][2]', 3, function(value) {
|
||||||
* return _.isObject(value) ? value : {};
|
* if (!_.isObject(value)) {
|
||||||
|
* return {};
|
||||||
|
* }
|
||||||
* });
|
* });
|
||||||
* // => { '0': { '1': { '2': 3 } } }
|
* // => { '0': { '1': { '2': 3 } } }
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user