Comparing version 0.0.1 to 0.0.2
33
index.js
@@ -54,18 +54,3 @@ | ||
Delegator.prototype.access = function(name){ | ||
var proto = this.proto; | ||
var target = this.target; | ||
this.getters.push(name); | ||
this.setters.push(name); | ||
Object.defineProperty(proto, name, { | ||
get: function(){ | ||
return this[target][name]; | ||
}, | ||
set: function(val){ | ||
this[target][name] = val; | ||
} | ||
}) | ||
return this; | ||
return this.getter(name).setter(name); | ||
}; | ||
@@ -86,7 +71,5 @@ | ||
Object.defineProperty(proto, name, { | ||
get: function(){ | ||
return this[target][name]; | ||
} | ||
}) | ||
proto.__defineGetter__(name, function(){ | ||
return this[target][name]; | ||
}); | ||
@@ -109,9 +92,7 @@ return this; | ||
Object.defineProperty(proto, name, { | ||
set: function(val){ | ||
this[target][name] = val; | ||
} | ||
}) | ||
proto.__defineSetter__(name, function(val){ | ||
return this[target][name] = val; | ||
}); | ||
return this; | ||
}; |
{ | ||
"name": "delegates", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": "visionmedia/node-delegates", | ||
@@ -5,0 +5,0 @@ "description": "delegate methods and accessors to another property", |
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
7
4208
132