1.0.14 • Published 2 years ago

@fehead/config v1.0.14

Weekly downloads
-
License
ISC
Repository
-
Last release
2 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

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago