2.0.0 • Published 7 years ago
defaultconfig v2.0.0
defaultconfig
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',
}
}