00001 var castPath = require('./_castPath'), 00002 last = require('./last'), 00003 parent = require('./_parent'), 00004 toKey = require('./_toKey'); 00005 00014 function baseUnset(object, path) { 00015 path = castPath(path, object); 00016 object = parent(object, path); 00017 return object == null || delete object[toKey(last(path))]; 00018 } 00019 00020 module.exports = baseUnset;