Skip to content
Raoul de Heer edited this page Sep 25, 2022 · 3 revisions

Installation

Install Mylas from NPM

npm i mylas
// Or
yarn add mylas

Examples

Synchronous functions:

const Mylas = require("mylas");
// Or
import Mylas from "mylas";

// Save string to file
Mylas.saveS("./text.txt", "Hello world!");

// Load string from file
const loadedData = Mylas.loadS("./text.txt");

// Save JSON to file
Mylas.Json.saveS("./text.json", [{test: "Hello world"}]);

// Load JSON from file
const loadedJSON = Mylas.Json.loadS("./text.json");

/// OR
import "mylas/register";

// Save JSON to file
JSON.saveS("./text.json", [{test: "Hello world"}]);

// Load JSON from file
const loadedJSON = JSON.loadS("./text.json");

Features

Explore all features in exports

Links

All functions Mylas has are at exports
To get started have a look at our getting started page
Find Mylas on npm
Find Mylas on github


Resources

Clone this wiki locally