obj-extend

0.1.0 • Public • Published

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 extend = require('obj-extend');
 
var Person = function (name) {
  this.name = name;
};
 
Person.prototype = extend(events.EventEmitter.prototype, {
 
  emitName: function () {
    this.emit('name', this.name);
  }
 
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    291,135
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    291,135

Package Sidebar

Install

npm i obj-extend

Weekly Downloads

68,009

Version

0.1.0

License

MIT

Last publish

Collaborators

  • mlmorg