This is Typescript wrapper utility over js-yaml which will merge the multiple yaml fles and safeload them and return the parsed yml.
import { mergeFiles } from 'merge-yaml-ts';
const input = [
__dirname + '/config1.yml',
__dirname + '/config2.yml',
];
const test = mergeFiles(input);
The repo contains linter, formatter, and the one simple unit test. All of this can be run with npm run default
.