1.0.14 • Published 3 years ago

@fehead/config v1.0.14

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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
1.0.14

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago