get-cff

Getting config from file

Usage no npm install needed!

<script type="module">
  import getCff from 'https://cdn.skypack.dev/get-cff';
</script>

README

get-cff

Getting config from file

Travis Build StatusAppVeyor Build Statusnodenpm versionDependency StatusXO code stylecodecov

npm downloadsnpm

Why ?

Auto detect type file and import config from file. Support:

  • js
  • json
  • dot file
  • yml

Install

npm i -S get-cff

Note: This project is compatible with node v6+

Usage

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