0.1.1 • Published 9 years ago

mextend v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

mextend

mextend means microextend means MICRO EXTEND for keepin it real basic. If you need complex extends, don't use.

Getting Started

npm install mextend

mextend is meant to be consumed in a CommonJS, Browserify environment:

var mextend = require('mextend');

var defaults = {
	'a' : 0,
	'b' : {},
	'c' : function(){ }
}

var options = {
	'a' : 0,
	'b' : {
		'super' : 'duper'
	},
	'c' : function(){ 
		console.log('really cool');
	}
}

console.log(mextend(defaults, options));

# Output
{
	'a' : 0,
	'b' : {
		'super' : 'duper'
	},
	'c' : function(){ 
		console.log('really cool');
	}
}