You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
438 B

'use strict';
/*eslint-disable no-console*/
var fs = require('fs');
var path = require('path');
var util = require('util');
var yaml = require('../lib/js-yaml');
try {
var filename = path.join(__dirname, 'sample_document.yml'),
contents = fs.readFileSync(filename, 'utf8'),
data = yaml.load(contents);
console.log(util.inspect(data, false, 10, true));
} catch (err) {
console.log(err.stack || String(err));
}