1.0.4 • Published 11 days ago
@korzun/config v1.0.4
Config
Easy Application Configuration Using Environment Variables
Installation
npm i @korzun/config
or
yarn add @korzun/config
Example
// config.ts
import { getBoolean, getNumber, getString } from '@korzun/config';
export const log = {
enableColors: getBoolean('LOG_ENABLE_COLORS', {
default: true
}),
flushFrequency: getNumber('LOG_FLUSH_DURATION', {
allowRange: [500, 10_000],
default: 1000
}),
level: getString('LOG_LEVEL', {
allowList: ['debug', 'info', 'warn', 'error', 'disabled'],
default: 'error'
}),
transport: getString('LOG_TRANSPORT', {
allowList: ['file', 'http', 'log'],
allowUndefined: true,
}),
};
1.0.4
11 days ago
1.0.3
11 days ago
1.0.2
1 year ago
0.0.0-pr.2.2.3e16394
1 year ago
0.0.0-pr.2.1.6cbd357
1 year ago
1.0.1
2 years ago
1.0.0
2 years ago