'use strict'; const yaml = require('js-yaml'); function isYAMLBlock(text) { return !!text.match(/^$/, ''); // js-yaml.safeLoad() throws on error return yaml.safeLoad(text); } exports.extractAndParseYAML = extractAndParseYAML;