53 lines
1.5 KiB
JavaScript
53 lines
1.5 KiB
JavaScript
import {
|
|
require_castPath
|
|
} from "./chunk-LCL5TIBZ.js";
|
|
import {
|
|
require_assignValue,
|
|
require_isIndex,
|
|
require_isObject,
|
|
require_toKey
|
|
} from "./chunk-CE4VABH2.js";
|
|
import {
|
|
__commonJS
|
|
} from "./chunk-PLDDJCW6.js";
|
|
|
|
// node_modules/lodash/_baseSet.js
|
|
var require_baseSet = __commonJS({
|
|
"node_modules/lodash/_baseSet.js"(exports, module) {
|
|
var assignValue = require_assignValue();
|
|
var castPath = require_castPath();
|
|
var isIndex = require_isIndex();
|
|
var isObject = require_isObject();
|
|
var toKey = require_toKey();
|
|
function baseSet(object, path, value, customizer) {
|
|
if (!isObject(object)) {
|
|
return object;
|
|
}
|
|
path = castPath(path, object);
|
|
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
while (nested != null && ++index < length) {
|
|
var key = toKey(path[index]), newValue = value;
|
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
return object;
|
|
}
|
|
if (index != lastIndex) {
|
|
var objValue = nested[key];
|
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
if (newValue === void 0) {
|
|
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
}
|
|
}
|
|
assignValue(nested, key, newValue);
|
|
nested = nested[key];
|
|
}
|
|
return object;
|
|
}
|
|
module.exports = baseSet;
|
|
}
|
|
});
|
|
|
|
export {
|
|
require_baseSet
|
|
};
|
|
//# sourceMappingURL=chunk-RI2W2UZ6.js.map
|