Pattern Library Utilities

convertYamlToObject

method
exports.convertYamlToObject()

@param Type Description
yml string string of yaml-formatted data

Returns an object from yaml data

exports.convertYamlToObject = function (yml) {
  'use strict';

  return yaml.safeLoad(yml);
};

convertObjectToYaml

method
exports.convertObjectToYaml()

@param Type Description
object object object of data to be converted to yaml

Returns yaml data from an object

exports.convertObjectToYaml = function (object) {
  'use strict';

  return yaml.safeDump(object);
};