CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
_baseUnset.js21 linesDownload Raw Back to lodash
1var castPath = require('./_castPath'),2    last = require('./last'),3    parent = require('./_parent'),4    toKey = require('./_toKey');5 6/**7 * The base implementation of `_.unset`.8 *9 * @private10 * @param {Object} object The object to modify.11 * @param {Array|string} path The property path to unset.12 * @returns {boolean} Returns `true` if the property is deleted, else `false`.13 */14function baseUnset(object, path) {15  path = castPath(path, object);16  object = parent(object, path);17  return object == null || delete object[toKey(last(path))];18}19 20module.exports = baseUnset;21 
basant307/AI_Governance_Project · CoolFace