mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.17.5.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import cloneArrayBuffer from './_cloneArrayBuffer.js';
|
||||
import cloneDataView from './_cloneDataView.js';
|
||||
import cloneMap from './_cloneMap.js';
|
||||
import cloneRegExp from './_cloneRegExp.js';
|
||||
import cloneSet from './_cloneSet.js';
|
||||
import cloneSymbol from './_cloneSymbol.js';
|
||||
import cloneTypedArray from './_cloneTypedArray.js';
|
||||
|
||||
@@ -32,16 +30,15 @@ var arrayBufferTag = '[object ArrayBuffer]',
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {Function} cloneFunc The function to clone values.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
@@ -60,7 +57,7 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object, isDeep, cloneFunc);
|
||||
return new Ctor;
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
@@ -70,7 +67,7 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object, isDeep, cloneFunc);
|
||||
return new Ctor;
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
|
||||
Reference in New Issue
Block a user