2.0.0 • Published 9 months ago

dallmo-yaml v2.0.0

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

dallmo-yaml

  • 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

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 main

esm

"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 );
2.0.0

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago