Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Extend objects easily in node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
LICENSE
Makefile
README.md
package.json

README.md

obj-extend

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.

Installation

$ npm install obj-extend

Usage

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

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

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

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

});
Something went wrong with that request. Please try again.