The type of the input value
The value to process (primitive, array, or plain object)
Function to generate new node keys from old ones. Defaults to the global key generator from configuration.
A deep clone of the original value with all node keys substituted
Deeply substitutes node keys in a data structure with new keys generated by a provided function.
This function recursively traverses the input data structure and replaces all node keys with new ones according to the provided key generator function. The function creates a deep clone of the original data structure, ensuring no references to the original remain.
Node keys are unique identifiers that are used internally to track and identify nodes in the data tree. Substituting these keys is useful when cloning nodes to ensure each node has a unique identity.
The function handles:
getNodeTypeAndKey
and substitutes them