1.0.1 • Published 9 months ago

@0b1.org/yaml-reader v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Yaml Parser

A minimalistic YAML parser with zero external dependencies.

Based on js-yaml by Vitaly Puzrin. Forked, heavily pruned, condensed and refactored.

Requirements

NodeJS v20 or higher.

Installing

Install from within your project, like this:

npm install 0bone/yaml-reader

Using

The file must be read into a string before calling the parser.

Example

const fs = require("node:fs");
const path = require("node:path");
const Parser = require("@0b1.org/yaml-reader/lib/parser");

const inputPath = path.join(__dirname, "./valid.yaml");
const inputData = fs.readFileSync(inputPath, "utf-8");
const result = Parser.Parse(inputData);

console.log(result);
1.0.1

9 months ago

1.0.0

9 months ago