config-extracter
v0.1.0
Published
A lib for resolving config in Node.js
Downloads
2
Maintainers
Readme
config-extracter
A lib for resolving config in Node.js
Supports file format
.js
.ts
Install
>$ npm install config-extracter
#or
>$ yarn add config-extracter
#or
>$ pnpm add config-extracter
Usage
import { extract } from 'config-extracter';
import * as path from 'path';
extract({
file: [path.resolve(process.cwd(), '.config.js'), path.resolve(process.cwd(), '.config.ts')],
}).then(config => {
if (config) {
console.log(config);
}
});