config-extend
Modified version of extend for config files
Last updated 4 years ago by jmerrick .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install config-extend 
SYNC missed versions from official npm registry.

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-extend

Usage

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'
			]
		}
	*/

Current Tags

  • 0.1.1                                ...           latest (4 years ago)

9 Versions

  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.5                                ...           7 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 119
Last Day 0
Last Week 64
Last Month 109
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |