0.1.1 • Published 8 years ago

config-operator v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Introduce


Build Status npm npm Coveralls

This a configure file manager.

Feature

  1. Support all method for configstore, except all
  2. Support add method, It can upgrade from String/Number to Array/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

Config#get(name)

Config#set(name, key ,value)

Config#add(name, key ,value)

Config#remove(name ,key)