Package Exports
- config-extend
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (config-extend) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-extend
Object extend function designed for config files.
Modified version of the node module node.extend, an implementation of jQuery extend.
Differences:
- Deep copying is enabled by default.
- Arrays are replaced instead of combined.
Installation
npm install config-extendUsage
var configExtend = require('config-extend'),
production = {
port: 1234,
memcached: [
'server1',
'server2',
'server3'
]
},
staging = {
port: 456,
memcached: [
'server4'
]
},
devFoo = {
memcached: [
'localhost'
]
},
objCombined = configExtend(production, staging, devFoo);
/* objCombined Value:
{
port: 456,
memcached: [
'localhost'
]
}
*/