# lark-config

> lark config module

Latest version **3.3.2** (published 2018-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install lark-config
pnpm add lark-config
yarn add lark-config
bun add lark-config
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.2 |
| Published | 2018-08-28 |
| First published | 2014-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 7 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sun Haohao |
| Maintainers | viringbells |
| Keywords | lark, config |

## Links

- npm: https://www.npmjs.com/package/lark-config
- Repository: https://github.com/larkjs/lark-config
- Issues: https://github.com/larkjs/lark-config/issues
- npm.io page: https://npm.io/package/lark-config

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.10.0
- [vi-misc](https://npm.io/package/vi-misc.md) ^1.13.2
- [parse-json](https://npm.io/package/parse-json.md) ^4.0.0
- [directoryfiles](https://npm.io/package/directoryfiles.md) ^2.1.0
- [replace-string](https://npm.io/package/replace-string.md) ^1.1.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 3.3.2 (latest) — 2018-08-28
- 3.3.1 — 2018-04-24
- 3.3.0 — 2018-04-24
- 3.2.4 — 2018-01-08
- 3.2.3 — 2018-01-07
- 3.2.2 — 2018-01-04
- 3.2.1 — 2017-12-06
- 3.2.0 — 2017-12-05
- 3.1.0 — 2017-11-21
- 3.0.0 — 2017-07-05
- 2.6.0 — 2017-06-07
- 2.5.3 — 2017-04-13
- 2.5.1 — 2017-04-12
- 2.5.0 — 2017-04-06
- 2.4.0 — 2017-03-31
- … 28 more at https://npm.io/package/lark-config/versions

## README

lark-config
===============

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

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


[npm-image]: https://img.shields.io/npm/v/lark-config.svg?style=flat-square
[npm-url]: https://npmjs.org/package/lark-config
[travis-image]: https://img.shields.io/travis/larkjs/lark-config/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/larkjs/lark-config
[coveralls-image]: https://img.shields.io/codecov/c/github/larkjs/lark-config.svg?style=flat-square
[coveralls-url]: https://codecov.io/github/larkjs/lark-config?branch=master

---
_Source: https://npm.io/package/lark-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
