Browse Source

无JIRA任务 换一下deepExtend

master
windy 6 years ago
parent
commit
4117224c60
  1. 45
      dist/bundle.ie.js
  2. 8
      dist/bundle.ie.min.js
  3. 45
      dist/bundle.js
  4. 8
      dist/bundle.min.js
  5. 45
      dist/core.js
  6. 25
      dist/demo.js
  7. 45
      dist/fineui.ie.js
  8. 8
      dist/fineui.ie.min.js
  9. 45
      dist/fineui.js
  10. 8
      dist/fineui.min.js
  11. 45
      dist/fineui_without_jquery_polyfill.js
  12. 45
      dist/utils.js
  13. 6
      dist/utils.min.js
  14. 2
      lodash.md
  15. 7
      src/core/base.js
  16. 38
      src/core/lodash.js

45
dist/bundle.ie.js vendored

@ -22,7 +22,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8915,6 +8915,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9773,6 +9808,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10675,6 +10711,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -10787,12 +10824,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

8
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/bundle.js vendored

@ -22,7 +22,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8915,6 +8915,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9773,6 +9808,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10675,6 +10711,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -10787,12 +10824,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

8
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/core.js vendored

@ -22,7 +22,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8915,6 +8915,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9773,6 +9808,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10675,6 +10711,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -10787,12 +10824,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

25
dist/demo.js vendored

@ -6126,7 +6126,30 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}; };
} }
}); });
BI.shortcut("demo.htape", Demo.HtapeLayout);/** BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22. * Created by User on 2017/3/22.
*/ */
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, { Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

45
dist/fineui.ie.js vendored

@ -264,7 +264,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -9157,6 +9157,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -10015,6 +10050,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10917,6 +10953,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -11029,12 +11066,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

8
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/fineui.js vendored

@ -264,7 +264,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -9157,6 +9157,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -10015,6 +10050,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10917,6 +10953,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -11029,12 +11066,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

8
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/fineui_without_jquery_polyfill.js vendored

@ -22,7 +22,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8915,6 +8915,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9773,6 +9808,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -10675,6 +10711,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -10787,12 +10824,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

45
dist/utils.js vendored

@ -22,7 +22,7 @@ if(_global.BI.prepares == null) {
}/** }/**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8915,6 +8915,41 @@ if(_global.BI.prepares == null) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9773,6 +9808,7 @@ if(_global.BI.prepares == null) {
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;
@ -11452,6 +11488,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -11564,12 +11601,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

6
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
lodash.md

@ -1 +1 @@
lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim" lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"

7
src/core/base.js

@ -564,6 +564,7 @@ if (!_global.BI) {
// deep方法 // deep方法
_.extend(BI, { _.extend(BI, {
deepClone: _.cloneDeep, deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) { isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length; var keys = BI.keys(attrs), length = keys.length;
@ -676,12 +677,6 @@ if (!_global.BI) {
} }
} }
return result; return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
} }
}); });

38
src/core/lodash.js

@ -1,7 +1,7 @@
/** /**
* @license * @license
* Lodash (Custom Build) <https://lodash.com/> * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"` * Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/> * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8894,6 +8894,41 @@
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
} }
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/** /**
* This method is like `_.merge` except that it accepts `customizer` which * This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source * is invoked to produce the merged values of the destination and source
@ -9752,6 +9787,7 @@
lodash.keys = keys; lodash.keys = keys;
lodash.map = map; lodash.map = map;
lodash.matches = matches; lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin; lodash.mixin = mixin;
lodash.negate = negate; lodash.negate = negate;
lodash.omit = omit; lodash.omit = omit;

Loading…
Cancel
Save