dallmo-yaml
v2.0.0
Published
- a simple config reader based on `fs` and `js-yaml` ; - config file assumed to be yaml ; - ESM-native - using this in CJS has to be done via [dynamic import][ref-2]
Readme
dallmo-yaml
- a simple config reader based on
fsandjs-yaml; - config file assumed to be yaml ;
- ESM-native
- using this in CJS has to be done via dynamic import
usage
cjs
"use strict";
( async()=>{
const dy = await import("dallmo-yaml");
// locate the test config file
const config_file = "./sample-config.yaml";
// test read the config
const config_obj = await dy.dallmo_yaml( config_file );
console.log( config_obj );
})(); // self-run async mainesm
"use strict";
import {dallmo_yaml} from 'dallmo-yaml';
// locate the test config file
const config_file = "./sample-config.yaml";
// test read the config
const config_obj = await dallmo_yaml( config_file );
console.log( config_obj );