Have ideas to improve npm?Join in the discussion! »

obj-extendTypeScript icon, indicating that this package has built-in type declarations

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);
  }
 
});

Keywords

none

Install

npm i obj-extend

DownloadsWeekly Downloads

79,405

Version

0.1.0

License

none

Last publish

Collaborators

  • avatar