mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-22 10:52:11 +00:00
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>