|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
|
/**
|
|
|
|
|
* lodash 4.5.4 (Custom Build) <https://lodash.com/>
|
|
|
|
|
* lodash 4.5.5 (Custom Build) <https://lodash.com/>
|
|
|
|
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
|
|
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
|
|
|
* Released under MIT license <https://lodash.com/license>
|
|
|
|
|
@@ -46,7 +46,10 @@ var arrayBufferTag = '[object ArrayBuffer]',
|
|
|
|
|
uint16Tag = '[object Uint16Array]',
|
|
|
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
|
|
|
|
|
|
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
|
|
|
|
/**
|
|
|
|
|
* Used to match `RegExp`
|
|
|
|
|
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
|
|
|
|
*/
|
|
|
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
|
|
|
|
|
|
|
|
/** Used to match `RegExp` flags from their coerced string values. */
|
|
|
|
|
@@ -317,7 +320,8 @@ var funcToString = Function.prototype.toString;
|
|
|
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
|
|
|
* Used to resolve the
|
|
|
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
|
|
|
* of values.
|
|
|
|
|
*/
|
|
|
|
|
var objectToString = objectProto.toString;
|
|
|
|
|
@@ -350,18 +354,18 @@ var DataView = getNative(root, 'DataView'),
|
|
|
|
|
nativeCreate = getNative(Object, 'create');
|
|
|
|
|
|
|
|
|
|
/** Used to detect maps, sets, and weakmaps. */
|
|
|
|
|
var dataViewCtorString = DataView ? (DataView + '') : '',
|
|
|
|
|
mapCtorString = Map ? funcToString.call(Map) : '',
|
|
|
|
|
promiseCtorString = Promise ? funcToString.call(Promise) : '',
|
|
|
|
|
setCtorString = Set ? funcToString.call(Set) : '',
|
|
|
|
|
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
|
|
|
|
var dataViewCtorString = toSource(DataView),
|
|
|
|
|
mapCtorString = toSource(Map),
|
|
|
|
|
promiseCtorString = toSource(Promise),
|
|
|
|
|
setCtorString = toSource(Set),
|
|
|
|
|
weakMapCtorString = toSource(WeakMap);
|
|
|
|
|
|
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
|
|
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
|
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates an hash object.
|
|
|
|
|
* Creates a hash object.
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
* @constructor
|
|
|
|
|
@@ -1178,8 +1182,8 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
|
|
|
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
|
|
|
getTag = function(value) {
|
|
|
|
|
var result = objectToString.call(value),
|
|
|
|
|
Ctor = result == objectTag ? value.constructor : null,
|
|
|
|
|
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
|
|
|
|
Ctor = result == objectTag ? value.constructor : undefined,
|
|
|
|
|
ctorString = Ctor ? toSource(Ctor) : undefined;
|
|
|
|
|
|
|
|
|
|
if (ctorString) {
|
|
|
|
|
switch (ctorString) {
|
|
|
|
|
@@ -1319,6 +1323,25 @@ function isPrototype(value) {
|
|
|
|
|
return value === proto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Converts `func` to its source code.
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
* @param {Function} func The function to process.
|
|
|
|
|
* @returns {string} Returns the source code.
|
|
|
|
|
*/
|
|
|
|
|
function toSource(func) {
|
|
|
|
|
if (func != null) {
|
|
|
|
|
try {
|
|
|
|
|
return funcToString.call(func);
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
try {
|
|
|
|
|
return (func + '');
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
}
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Performs a
|
|
|
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
|
|
|
|
@@ -1544,8 +1567,9 @@ function isLength(value) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
|
|
|
|
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
|
|
|
* Checks if `value` is the
|
|
|
|
|
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
|
|
|
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
|
|
|
*
|
|
|
|
|
* @static
|
|
|
|
|
* @memberOf _
|
|
|
|
|
@@ -1619,14 +1643,11 @@ function isObjectLike(value) {
|
|
|
|
|
* // => false
|
|
|
|
|
*/
|
|
|
|
|
function isNative(value) {
|
|
|
|
|
if (value == null) {
|
|
|
|
|
if (!isObject(value)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (isFunction(value)) {
|
|
|
|
|
return reIsNative.test(funcToString.call(value));
|
|
|
|
|
}
|
|
|
|
|
return isObjectLike(value) &&
|
|
|
|
|
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
|
|
|
|
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
|
|
|
return pattern.test(toSource(value));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|