@0devs/config
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

@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

/@0devs/config/

    Package Sidebar

    Install

    npm i @0devs/config

    Weekly Downloads

    10

    Version

    2.4.0

    License

    MIT

    Unpacked Size

    23.3 kB

    Total Files

    13

    Last publish

    Collaborators

    • 0devs.team
    • alekzonder