mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Bump to v4.4.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define(['./_baseToPath', './has', './_isKey', './last', './_parent'], function(baseToPath, has, isKey, last, parent) {
|
||||
define(['./_baseCastPath', './has', './_isKey', './last', './_parent'], function(baseCastPath, has, isKey, last, parent) {
|
||||
|
||||
/**
|
||||
* The base implementation of `_.unset`.
|
||||
@@ -9,7 +9,7 @@ define(['./_baseToPath', './has', './_isKey', './last', './_parent'], function(b
|
||||
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
||||
*/
|
||||
function baseUnset(object, path) {
|
||||
path = isKey(path, object) ? [path + ''] : baseToPath(path);
|
||||
path = isKey(path, object) ? [path + ''] : baseCastPath(path);
|
||||
object = parent(object, path);
|
||||
var key = last(path);
|
||||
return (object != null && has(object, key)) ? delete object[key] : true;
|
||||
|
||||
Reference in New Issue
Block a user