2.4.0 • Published 4 years ago

@0devs/config v2.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@0devs/config

extendable config for node and browser

install

npm install --save @0devs/config

usage

import Config from "@0devs/config";

const config = new Config();

config
  .defaults({server: {host: null, port: 80}})
  .from(() => Promise.resolve({server: {host: "127.0.0.1", port: 8080}}), ".")
  .from(() => Promise.resolve(9090), "server.port");

await config.read();

config.get("server.port"); // => 9090
config.config(); // {server: {host: "127.0.0.1", port: 9090}}

LICENSE

MIT

2.4.0

4 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.4.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

0.0.0

6 years ago