mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Rebuild dist.
This commit is contained in:
39
dist/lodash.compat.js
vendored
39
dist/lodash.compat.js
vendored
@@ -76,7 +76,7 @@
|
||||
* See this [article on `RegExp` characters](http://www.regular-expressions.info/characters.html#special)
|
||||
* for more details.
|
||||
*/
|
||||
var reRegExpChars = /[.*+?^${}()|[\]\\]/g;
|
||||
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g;
|
||||
|
||||
/** Used to detect functions containing a `this` reference */
|
||||
var reThis = /\bthis\b/;
|
||||
@@ -305,8 +305,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.max` and `_.min` as the default callback when a given
|
||||
* collection is a string value.
|
||||
* Used by `_.max` and `_.min` as the default callback when a given collection
|
||||
* is a string value.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
@@ -317,7 +317,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index of the first character of `string` that is not found in `chars`.
|
||||
* Used by `_.trim` and `_.trimLeft` to get the index of the first character
|
||||
* of `string` that is not found in `chars`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
@@ -337,7 +338,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index of the last character of `string` that is not found in `chars`.
|
||||
* Used by `_.trim` and `_.trimRight` to get the index of the last character
|
||||
* of `string` that is not found in `chars`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
@@ -468,7 +470,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index of the first non-whitespace character of `string`.
|
||||
* Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
|
||||
* character of `string`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
@@ -489,7 +492,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index of the last non-whitespace character of `string`.
|
||||
* Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
|
||||
* character of `string`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
@@ -5717,7 +5721,7 @@
|
||||
* // => { 'name': 'barney', 'employer': 'slate' }
|
||||
*/
|
||||
function defaults(object) {
|
||||
if (!object || arguments.length < 2) {
|
||||
if (!object) {
|
||||
return object;
|
||||
}
|
||||
var args = slice(arguments);
|
||||
@@ -6349,7 +6353,7 @@
|
||||
// and avoid a V8 bug
|
||||
// https://code.google.com/p/v8/issues/detail?id=2291
|
||||
var type = typeof value;
|
||||
return (value && (type == 'function' || type == 'object')) || false;
|
||||
return type == 'function' || (value && type == 'object') || false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6492,9 +6496,7 @@
|
||||
* // => false
|
||||
*/
|
||||
function isRegExp(value) {
|
||||
var type = typeof value;
|
||||
return (value && (type == 'function' || type == 'object') &&
|
||||
toString.call(value) == regexpClass) || false;
|
||||
return (isObject(value) && toString.call(value) == regexpClass) || false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6739,13 +6741,13 @@
|
||||
* // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] }
|
||||
*/
|
||||
function merge(object, source, guard) {
|
||||
if (!object) {
|
||||
return object;
|
||||
}
|
||||
var args = arguments,
|
||||
length = args.length,
|
||||
type = typeof guard;
|
||||
|
||||
if (!object || length < 2) {
|
||||
return object;
|
||||
}
|
||||
// enables use as a callback for functions like `_.reduce`
|
||||
if ((type == 'number' || type == 'string') && args[3] && args[3][guard] === source) {
|
||||
length = 2;
|
||||
@@ -6924,9 +6926,10 @@
|
||||
if (isArr) {
|
||||
accumulator = [];
|
||||
} else {
|
||||
var ctor = object && object.constructor,
|
||||
proto = ctor && ctor.prototype;
|
||||
|
||||
if (isObject(object)) {
|
||||
var ctor = object.constructor,
|
||||
proto = ctor && ctor.prototype;
|
||||
}
|
||||
accumulator = baseCreate(proto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user