|
|
@ -9613,7 +9613,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
})( window );/** |
|
|
|
})( window );/** |
|
|
|
* @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"` |
|
|
|
* 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"` |
|
|
|
* 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>
|
|
|
@ -10333,6 +10333,39 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
return cache.has(key); |
|
|
|
return cache.has(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol |
|
|
|
|
|
|
|
* that is not found in the character symbols. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @private |
|
|
|
|
|
|
|
* @param {Array} strSymbols The string symbols to inspect. |
|
|
|
|
|
|
|
* @param {Array} chrSymbols The character symbols to find. |
|
|
|
|
|
|
|
* @returns {number} Returns the index of the first unmatched string symbol. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function charsStartIndex(strSymbols, chrSymbols) { |
|
|
|
|
|
|
|
var index = -1, |
|
|
|
|
|
|
|
length = strSymbols.length; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} |
|
|
|
|
|
|
|
return index; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol |
|
|
|
|
|
|
|
* that is not found in the character symbols. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @private |
|
|
|
|
|
|
|
* @param {Array} strSymbols The string symbols to inspect. |
|
|
|
|
|
|
|
* @param {Array} chrSymbols The character symbols to find. |
|
|
|
|
|
|
|
* @returns {number} Returns the index of the last unmatched string symbol. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function charsEndIndex(strSymbols, chrSymbols) { |
|
|
|
|
|
|
|
var index = strSymbols.length; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} |
|
|
|
|
|
|
|
return index; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Gets the number of `placeholder` occurrences in `array`. |
|
|
|
* Gets the number of `placeholder` occurrences in `array`. |
|
|
|
* |
|
|
|
* |
|
|
@ -13053,6 +13086,21 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
return isKey(value, object) ? [value] : stringToPath(toString(value)); |
|
|
|
return isKey(value, object) ? [value] : stringToPath(toString(value)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Casts `array` to a slice if it's needed. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @private |
|
|
|
|
|
|
|
* @param {Array} array The array to inspect. |
|
|
|
|
|
|
|
* @param {number} start The start position. |
|
|
|
|
|
|
|
* @param {number} [end=array.length] The end position. |
|
|
|
|
|
|
|
* @returns {Array} Returns the cast slice. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function castSlice(array, start, end) { |
|
|
|
|
|
|
|
var length = array.length; |
|
|
|
|
|
|
|
end = end === undefined ? length : end; |
|
|
|
|
|
|
|
return (!start && end >= length) ? array : baseSlice(array, start, end); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Creates a clone of `buffer`. |
|
|
|
* Creates a clone of `buffer`. |
|
|
|
* |
|
|
|
* |
|
|
@ -18836,6 +18884,44 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
: string; |
|
|
|
: string; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Removes leading and trailing whitespace or specified characters from `string`. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @static |
|
|
|
|
|
|
|
* @memberOf _ |
|
|
|
|
|
|
|
* @since 3.0.0 |
|
|
|
|
|
|
|
* @category String |
|
|
|
|
|
|
|
* @param {string} [string=''] The string to trim. |
|
|
|
|
|
|
|
* @param {string} [chars=whitespace] The characters to trim. |
|
|
|
|
|
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. |
|
|
|
|
|
|
|
* @returns {string} Returns the trimmed string. |
|
|
|
|
|
|
|
* @example |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.trim(' abc '); |
|
|
|
|
|
|
|
* // => 'abc'
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.trim('-_-abc-_-', '_-'); |
|
|
|
|
|
|
|
* // => 'abc'
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.map([' foo ', ' bar '], _.trim); |
|
|
|
|
|
|
|
* // => ['foo', 'bar']
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function trim(string, chars, guard) { |
|
|
|
|
|
|
|
string = toString(string); |
|
|
|
|
|
|
|
if (string && (guard || chars === undefined)) { |
|
|
|
|
|
|
|
return string.replace(reTrim, ''); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!string || !(chars = baseToString(chars))) { |
|
|
|
|
|
|
|
return string; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var strSymbols = stringToArray(string), |
|
|
|
|
|
|
|
chrSymbols = stringToArray(chars), |
|
|
|
|
|
|
|
start = charsStartIndex(strSymbols, chrSymbols), |
|
|
|
|
|
|
|
end = charsEndIndex(strSymbols, chrSymbols) + 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return castSlice(strSymbols, start, end).join(''); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -19356,6 +19442,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
lodash.result = result; |
|
|
|
lodash.result = result; |
|
|
|
lodash.size = size; |
|
|
|
lodash.size = size; |
|
|
|
lodash.some = some; |
|
|
|
lodash.some = some; |
|
|
|
|
|
|
|
lodash.trim = trim; |
|
|
|
lodash.uniqueId = uniqueId; |
|
|
|
lodash.uniqueId = uniqueId; |
|
|
|
|
|
|
|
|
|
|
|
// Add aliases.
|
|
|
|
// Add aliases.
|
|
|
@ -20144,8 +20231,8 @@ if (!window.BI) { |
|
|
|
return BI.isString(obj) && !BI.isEmptyString(obj); |
|
|
|
return BI.isString(obj) && !BI.isEmptyString(obj); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isWindow: function () { |
|
|
|
isWindow: function (obj) { |
|
|
|
return $.isWindow.apply($, arguments); |
|
|
|
return obj != null && obj == obj.window; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -20428,7 +20515,7 @@ if (!window.BI) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isNumeric: function (number) { |
|
|
|
isNumeric: function (number) { |
|
|
|
return $.isNumeric(number); |
|
|
|
return !isNaN( parseFloat(number) ) && isFinite( number ); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isFloat: function (number) { |
|
|
|
isFloat: function (number) { |
|
|
@ -20473,7 +20560,7 @@ if (!window.BI) { |
|
|
|
// 字符串相关方法
|
|
|
|
// 字符串相关方法
|
|
|
|
_.extend(BI, { |
|
|
|
_.extend(BI, { |
|
|
|
trim: function () { |
|
|
|
trim: function () { |
|
|
|
return $.trim.apply($, arguments); |
|
|
|
return _.trim.apply(_, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
toUpperCase: function (string) { |
|
|
|
toUpperCase: function (string) { |
|
|
|