{"ast":null,"code":"import castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n  path = castPath(path, object);\n\n  // Prevent prototype pollution:\n  // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg\n  // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh\n  var index = -1,\n    length = path.length;\n  if (!length) {\n    return true;\n  }\n  while (++index < length) {\n    var key = toKey(path[index]);\n\n    // Always block \"__proto__\" anywhere in the path if it's not expected\n    if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {\n      return false;\n    }\n\n    // Block constructor/prototype as non-terminal traversal keys to prevent\n    // escaping the object graph into built-in constructors and prototypes.\n    if ((key === 'constructor' || key === 'prototype') && index < length - 1) {\n      return false;\n    }\n  }\n  var obj = parent(object, path);\n  return obj == null || delete obj[toKey(last(path))];\n}\nexport default baseUnset;","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}