Skip to content

Instantly share code, notes, and snippets.

@radekwarisch
Last active February 9, 2021 17:35
Show Gist options
  • Save radekwarisch/be1d9ace7ce3c9a946af78574edac791 to your computer and use it in GitHub Desktop.
Save radekwarisch/be1d9ace7ce3c9a946af78574edac791 to your computer and use it in GitHub Desktop.
Merge files utils
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