{"ast":null,"code":"import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n  dateTag = '[object Date]',\n  mapTag = '[object Map]',\n  numberTag = '[object Number]',\n  regexpTag = '[object RegExp]',\n  setTag = '[object Set]',\n  stringTag = '[object String]',\n  symbolTag = '[object Symbol]';\nvar arrayBufferTag = '[object ArrayBuffer]',\n  dataViewTag = '[object DataView]',\n  float32Tag = '[object Float32Array]',\n  float64Tag = '[object Float64Array]',\n  int8Tag = '[object Int8Array]',\n  int16Tag = '[object Int16Array]',\n  int32Tag = '[object Int32Array]',\n  uint8Tag = '[object Uint8Array]',\n  uint8ClampedTag = '[object Uint8ClampedArray]',\n  uint16Tag = '[object Uint16Array]',\n  uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n    case float32Tag:\n    case float64Tag:\n    case int8Tag:\n    case int16Tag:\n    case int32Tag:\n    case uint8Tag:\n    case uint8ClampedTag:\n    case uint16Tag:\n    case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n    case mapTag:\n      return new Ctor();\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n    case regexpTag:\n      return cloneRegExp(object);\n    case setTag:\n      return new Ctor();\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\nexport default initCloneByTag;","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}