# const-settings

> You can easily use it by defining the value in config/settings.yaml

Latest version **2.0.0** (published 2021-08-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install const-settings
pnpm add const-settings
yarn add const-settings
bun add const-settings
```

## 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 | 2.0.0 |
| Published | 2021-08-04 |
| First published | 2020-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | smicle |
| Maintainers | smicle |
| Keywords | yaml, settings |

## Links

- npm: https://www.npmjs.com/package/const-settings
- Repository: https://github.com/smicle/const-settings
- Homepage: https://github.com/smicle/const-settings#readme
- Issues: https://github.com/smicle/const-settings/issues
- npm.io page: https://npm.io/package/const-settings

## Dependencies (2)

- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [@types/js-yaml](https://npm.io/package/@types/js-yaml.md) ^3.12.4

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-08-04
- 1.0.0 — 2020-05-31
- 0.1.0 — 2020-05-26
- 0.0.1 — 2020-05-21

## README

# const-settings
[![npm version](https://badge.fury.io/js/const-settings.svg)](https://badge.fury.io/js/const-settings)
[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

## Intro
By placing a specific YAML under `config/` and defining the constants, you can easily read the value.  

## Installation
```sh
npm install const-settings
```

## Settings
Place the file that defines the constants in `config/settings.yaml` or `config/settings.yml`.  
If you want to split the file, set YAML under `config/settings/`.  

### Configuration Example
```
├── config
│   ├── settings
│   │   ├── fuga.yaml
│   │   └── piyo.yml
│   ├── settings.yaml
│   └── settings.yml
├── package-lock.json
└── package.json
```

## Usage
### JavaScript
```js
const Settings = require('const-settings').default

Settings.PIYO.forEach(v => console.log(v))
```

### TypeScript
```ts
import Settings from 'const-settings'

Settings.PIYO.forEach((v: string) => console.log(v))
```

## Test
```sh
npm run test
```

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