config-operator
v0.1.1
Published
operate config object with fully utils
Downloads
8
Readme
Introduce
This a configure file manager.
Feature
- Support all method for
configstore
, exceptall
- Support
add
method, It can upgrade fromString
/Number
toArray
/Object
Usage
npm install config-operator
var Config = require('config-operator')
var config = new Config()
config.set('key', 'value')
// {key: 'value'}
config.add('key', 'value2')
// {key: ['value', 'value2']
config.get('key')
// {key: ['value', 'value2']
config.remove('key', 'value')
// {key: ['value2']}
config.remove('key')
// {}
API
Config(config)
config config object
return config instance