Philipp Horstenkamp 2b58149655
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 39s
Added the underscore node_module.
2023-11-19 13:27:05 +01:00

16 lines
316 B
JavaScript

define(['./isArray', './isObject', './_set'], function (isArray, isObject, _set) {
// set the value in given path
function set (obj, path, value) {
if (!isObject(obj) || !isArray(path)) return obj;
if (path.length === 0) return obj;
_set(obj, path, value);
return obj;
}
return set;
});