1. obj-extend
Extend objects easily in node.js
obj-extend
Package: obj-extend
Created by: mlmorg
Last modified: Wed, 22 Jun 2022 16:07:09 GMT
Version: 0.1.0
License: MIT
Downloads: 326,173
Repository: https://github.com/mlmorg/obj-extend

Install

npm install obj-extend
yarn add obj-extend

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

});

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code