@fehead/config
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

install

pnpm install --save @fehead/config

user

import config from '@fehead/config'

// 是否存在key
config.has(`key`)
// 获取key,默认为string
config.get(`key`,defaultValue)
config.string(`key`,defaultValue)
config.int(`key`, defaultValue)
config.float(`key`,defaultValue)
config.bool(`key`,defaultValue)
config.array(`key`,defaultValue)
config.object(`key`,defaultValue)
config.date(`key`,defaultValue)

start

export NODE_DEV = 'test'|'prod'|'test'
node index.js --prod
node index.js --test
node index.js --dev
```p

# config file

- config/config.default.json
- config/config.dev.json
- config/config.test.json
- config/config.prod.json

Readme

Keywords

none

Package Sidebar

Install

npm i @fehead/config

Weekly Downloads

0

Version

1.0.14

License

ISC

Unpacked Size

14.4 kB

Total Files

8

Last publish

Collaborators

  • imeepos2
  • feheadline_admin