get(object, path, defaultValue?) Get the value of the property at the given path.
Returns a value if any.
const obj = {
property: {
test: "A",
},
};
const result = get(obj, "property");
set(object, path, value)
Returns a object.
const obj = {
property: {
test: "A",
},
};
const result = set(obj, "property", "B");
delete(object, path)
Returns a object without the property deleted.
const obj = {
property: {
test: "A",
},
};
const result = del(obj, "property.test");
merge(object, path)
Returns a object with the property and value passed by argument merged.
const obj = {
property: {
test: [1, 2],
},
};
const result = merge(obj, "property.test", [3, 4]);
yarn test