Add a new option to `objectClean` function which allows to clean falsy values (including `undefined` and `null`) from an object when set to `true`. This is achieved by deleting all the falsy values from the object when the option is enabled.
The change also includes updates to the corresponding tests.
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit introduces a new function `objectRemap` in `object-util` package. It takes an object as input and applies the provided mapping function to each key-value pair. It produces a new object with transformed keys and values.
The `objectRemap` function is more advanced than `objectMap` as it transforms an object back into another object. It works on objects and arrays. If multiple keys are the same, only the last value will be set by default, but enabling the `strict` option will throw an error if the same key is set twice.
This commit also updates the import statement in tests for this new function.
Signed-off-by: Avior <f.bouillon@aptatio.com>