Socket
Socket
Sign inDemoInstall

obj-extend

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    obj-extend

Extend objects easily in node.js


Version published
Weekly downloads
82K
increased by0.06%
Maintainers
1
Install size
3.39 kB
Created
Weekly downloads
 

Readme

Source

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

});

FAQs

Last updated on 19 Oct 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc