This composition function does everything Crossplane's built-in patch & transform composition does. Instead of specifying spec.resources in your Composition, you can use this function. See the README for examples and documentation.
spec.resources