1 2 3 4 5 6 7 8 9 10 11 12 13 | 1x 2x 2x 2x | module.exports = function({ process, fs, rawBody, jsYaml, }) { return function parseInputYaml(file) { const stream = file ? fs.readFile(file) : process.stdin; return rawBody(stream, {encoding: 'utf-8'}) .then(jsYaml.safeLoadAll); }; } |