node-extend
Advanced tools
Comparing version 0.0.8 to 0.2.0
@@ -5,9 +5,6 @@ var util = require('util'); | ||
extend.EXTEND = 'EXTEND'; | ||
function extend(A,B,as,isAargs){ | ||
function extend(A,B,B_args){ | ||
var ___A___ = A; | ||
var ___B___ = B; | ||
if(arguments.length < 2){ | ||
@@ -21,12 +18,5 @@ throw new Error('arguments is error!'); | ||
if(!B_args){} | ||
else if(B_args === extend.EXTEND){ | ||
args += 'var args = arguments'; | ||
}else if(B_args.length >= 0){ | ||
args += 'var args = ['; | ||
for(var i=0 ; i<as.length ; i++){ | ||
args += 'arguments['+as[i]+']'; | ||
if(i!==as.length-1) args += ','; | ||
} | ||
args += '];' | ||
if(isAargs){ | ||
}else{ | ||
args = 'var args = '+JSON.stringify(as)+';'; | ||
} | ||
@@ -39,5 +29,6 @@ } | ||
var e = ''; | ||
if(args){e += '___B___.apply(this,args);'}else{e += '___B___.apply(this);';} | ||
if(isAargs){e += '___B___.apply(this,arguments);'}else{e += '___B___.apply(this);';} | ||
e+='___A___.apply(this,arguments)'; | ||
var ss = header+e+footer | ||
console.log(args) | ||
var nn = eval('('+ss+')'); | ||
@@ -47,2 +38,6 @@ var ap = A.prototype; | ||
for(var k in B){ | ||
nn[k] = B[k]; | ||
} | ||
for(var k in A){ | ||
@@ -49,0 +44,0 @@ nn[k] = A[k]; |
{ | ||
"name": "node-extend", | ||
"version": "0.0.8", | ||
"version": "0.2.0", | ||
"description": "extend for javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1868
37