2.0.0 • Published 7 years ago

defaultconfig v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

defaultconfig Build Status

Create a configuration factory

Usage

npm install --save defaultconfig

import defaultconfig from 'defaultconfig';

// create a function factory with a default config
const configFactory = defaultconfig({
  user: {
    firstName: 'max',
    lastName: 'malm',
  }
});

// supply the changes you wish to merge into your default config
const config = configFactory({
  user: {
    lastName: 'smith',
  }
})

config is now

{
  user: {
    firstName: 'max',
    lastName: 'smith',
  }
}
2.0.0

7 years ago

1.0.0

8 years ago