https://github.com/scrum/get-cff
Getting config from file
https://github.com/scrum/get-cff
config files loader
Last synced: 11 months ago
JSON representation
Getting config from file
- Host: GitHub
- URL: https://github.com/scrum/get-cff
- Owner: Scrum
- License: mit
- Created: 2017-10-11T09:01:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T17:26:02.000Z (over 3 years ago)
- Last Synced: 2025-07-20T08:03:29.686Z (11 months ago)
- Topics: config, files, loader
- Language: JavaScript
- Size: 1.16 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license
Awesome Lists containing this project
README
# get-cff
> Getting config from file
[](https://travis-ci.org/Scrum/get-cff)[](https://ci.appveyor.com/project/GitScrum/get-cff)[]()[](https://www.npmjs.com/package/get-cff)[](https://github.com/sindresorhus/xo)[](https://codecov.io/gh/Scrum/get-cff)
[](https://www.npmjs.com/package/get-cff)[](https://www.npmjs.com/package/get-cff)
## Why ?
Auto detect type file and import config from file. Support:
- [x] js
- [x] json
- [x] dot file
- [x] yml
## Install
```bash
npm i -S get-cff
```
> **Note:** This project is compatible with node v6+
## Usage
```js
import getCff from 'get-cff';
getCff('path/to/config/file')
.then(config => {
console.log(config);
});
```
*Returns config object {property: value}*
## Options
### `path`
Type: `string`
Default: ''
Description: *path to you config file*