vpm-config
v4.0.1
Published
vpm config
Downloads
19
Readme
Config
配置文件管理
Install
npm i vpm-config
Usage
const Config = require('vpm-config')
const config = new Config({})
Example
config.set('dev.db.username', 'root')
config.set('dev.db.password', 'root')
config.get('dev.db.username')
config.get('dev.db.password')
config.merge({
app: {
name: 'name',
logo: 'logo',
tags: [1,2,3],
mods: {
foo: 'bar'
}
}
})
config.get('app.name')
config.get('app.mods.foo')
config.merge('app.mods', {
bar: 'foo'
})
config.get('app.mods')
npm run test