import { parse } from 'yaml' import fs from 'fs' console.log("Parsing the manual file...") parse('3.14159') // 3.14159 parse('[ true, false, maybe, null ]\n') // [ true, false, 'maybe', null ] const file = fs.readFileSync('./manual/index.yml', 'utf8') const parsed = parse(file) // { YAML: // [ 'A human-readable data serialization language', // 'https://en.wikipedia.org/wiki/YAML' ], // yaml: // [ 'A complete JavaScript implementation', // 'https://www.npmjs.com/package/yaml' ] } console.log(parsed)