node-extend

extend for javascript

9 个版本
安装
npm install node-extend
yarn add node-extend
pnpm add node-extend
bun add node-extend
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
版本列表
0.2.0 2012-10-08
0.0.8 2012-09-26
0.0.7 2012-09-07
0.0.6 2012-09-07
0.0.5 2012-09-07
0.0.4 2012-09-07
0.0.3 2012-09-06
0.0.2 2012-09-06
0.0.1 2012-09-06