A yaml file loader & parser module for Deno

A yaml file loader & parser module for Deno

Yaml Loader is a Deno module that allows you to load yaml files and parse their contents as json.

yaml_loader

Yaml Loader is a Deno module that allows you to load yaml files and parse their contents as json.

Features

Yaml Loader will parse your json files using the deno standard library, therefore, there aren't any third-party modules used.

Usage

Before using yaml_loader, you must first have Deno installed. If you don't, go to the Deno Installation page and follow those simple steps :)

All right, nown that we got that stuff over, you can just use the yaml_loader module in your project by add this simple line of code:

import { YamlLoader } from "https://deno.land/x/yaml_loader/mod.ts";

After that, we can start utilizing the YamlLoader class! The only method inside of the class that you need is parseFile. It is an asynchronous method, though, so remember to always await for it to be done ;) Here is an example of using the YamlLoader:

There is a breaking change when updating from v0.0.0 to v0.1.0 The parseYamlFile method on YamlLoader is now named parseFile

import { YamlLoader } from "https://deno.land/x/yaml_loader/mod.ts";

const yamlLoader = new YamlLoader();

const parsedYamlFile = await yamlLoader.parseFile("./foo.yaml");

console.log(parsedYamlFile);

The above code would parse the foo.yaml file and set its json-ified contents to the parsedYamlFile constant. After that, we are just logging out the data as an object from foo.yaml after it is parsed.

Download Details:

Author: CodingCarter

Demo: https://deno.land/x/[email protected]

Source Code: https://github.com/CodingCarter/yaml_loader

deno nodejs node javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

AEM Querybuilder for JavaScript (Browser, Node, Deno)

Helix Querybuilder .AEM Querybuilder for JavaScript (Browser, Node, Deno)

NKeys for JavaScript - Node.js, Browsers, and Deno

A public-key signature system based on Ed25519 for the NATS ecosystem system for JavaScript. The nkeys.js library works in Deno, Node.js, and the browser!

Javascript module for easily generating mazes,compatible with both Deno and Node

A work-in-progress Javascript maze generator module, compatible with both Deno and Node.

Deno Tutorial for Beginners: Deno vs. Node: Better Than NodeJS?

Deno is released, it’s time to find out if it can prove a worthy competition for Node.js. What is Deno? Why Deno can be considered an alternative to Node? The main differences between Deno and Node. Write a simple Deno app.

What is Deno? The Node.JS Killer? The Deno-minator to Node?

What is Deno? The Node.JS Killer? The Deno-minator to Node? Deno is the new hype and will it be better than node.js? Deno is a secure runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language that addresses Node’s shortcomings