Last active
February 9, 2021 17:35
-
-
Save radekwarisch/be1d9ace7ce3c9a946af78574edac791 to your computer and use it in GitHub Desktop.
Merge files utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const mergeFilesAnd = <TInputType>( | |
...plugins: (ChainableType<TInputType>)[] | |
) => (input: TInputType) => () => { | |
const {templates = empty()} = input; | |
return chain([ | |
mergeWith(templates, MergeStrategy.Overwrite), | |
...plugins.map(compose(input)), | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment