config-operator

0.1.1 • Public • Published

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])

Readme

Keywords

none

Package Sidebar

Install

npm i config-operator

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • xgheaven