Skip to content

Commit

Permalink
* removing the break statement (was unnecessary);
Browse files Browse the repository at this point in the history
* removing the extraPropertiesLength variable;
* fixing some spacing.
  • Loading branch information
fabiomcosta committed Mar 23, 2010
1 parent 439a09a commit b6e609a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/Class/Class.js
Expand Up @@ -104,14 +104,13 @@ var getInstance = function(klass){

var extraProperties = ['hasOwnProperty', 'valueOf', 'isPrototypeOf', 'propertyIsEnumerable',
'toLocaleString', 'toString', 'constructor'];
for(var i in {toString: 1}){ extraProperties = []; break; };
var extraPropertiesLength = extraProperties.length;
for (var i in {toString: 1}){ extraProperties = []; };

Class.implement({implement: function(object){
for (var key in object) implement.call(this, key, object[key]);
for (var i = extraPropertiesLength, name; i--;){
for (var i = extraProperties.length, name; i--;){
name = extraProperties[i];
if(object.hasOwnProperty(name)) implement.call(this, name, object[name]);
if (object.hasOwnProperty(name)) implement.call(this, name, object[name]);
}
return this;
}});
Expand Down

0 comments on commit b6e609a

Please sign in to comment.