3.3.2 • Published 6 years ago

lark-config v3.3.2

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

lark-config

NPM version build status Test coverage

This is a tool to load configs from files

How to install

$ npm install --save lark-config

How to use

const config = new Config();
await config.load('configs');

This will load all files (.js, .json, .yaml, .yml, .node) in directory 'configs'.

Then you can easily get/check/remove a config by path:

config.get("path.to.file.foo.bar");       // nearly same as require('path/to/file').foo.bar
config.has("path.to.file.foo.bar");
config.delete("path.to.file.foo.bar");
config.set("path.to.file.foo.bar", "new-value");

If you want to switch the config by environment, use the second param as tag:

await config.load('configs', '@online');

It will use config named as foo@online rather than foo if exists

3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.2.4

6 years ago

3.2.3

6 years ago

3.2.2

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

7 years ago

2.6.0

7 years ago

2.5.3

7 years ago

2.5.1

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.7.0

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.4.4

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago