JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 277
  • Score
    100M100P100Q95060F
  • License MIT

extend for javascript

Package Exports

  • node-extend

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-extend) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

extend

extend for node.js

example

function A(){
    this.name = 'brighthas | leo';
}

A.prototype.getName = function(){
    return this.name;
}

function B(){
    this.age = 31;
}

B.prototype.getAge = function(){
    return this.age;
}


var extend = require('node-extend');
var A2 = extend(A,B); // A extend B.
var a = new A2();
console.log(a.getName());  // brighthas | leo
console.log(a.getAge());   // 31

install

npm install node-extend