Extend objects easily in node.js

npm install obj-extend
362 downloads in the last day
1 473 downloads in the last week
7 306 downloads in the last month


When called, this module simply sets all of the properties of each source object onto the destination object (the first argument). Every property with the same name is overridden in the order in which they were passed.


$ npm install obj-extend


var extend = require('obj-extend');

var Person = function (name) {
  this.name = name;

Person.prototype = extend(events.EventEmitter.prototype, {

  emitName: function () {
    this.emit('name', this.name);

npm loves you