loconf

loconf - local config

Usage no npm install needed!

<script type="module">
  import loconf from 'https://cdn.skypack.dev/loconf';
</script>

README

loconf

local configuration persistence

feature

  • json format
  • two level support

usage


// config project `fengchao`
env.use('fengchao');

// set item port as 8080
env.set('port', 8080);
env.set('host', 'localhost');

// get item value
var host = env.get('host');

// get fengchao configuration
console.log(env.getContext('project'));