prototypes
Advanced tools
Comparing version 0.0.3 to 0.1.1
@@ -20,11 +20,3 @@ 'use strict'; | ||
{ | ||
var count = 0; | ||
for (var key in this) | ||
{ | ||
if (this.hasOwnProperty(key)) | ||
{ | ||
count++; | ||
} | ||
} | ||
return count; | ||
return Object.keys(this).length; | ||
}; | ||
@@ -101,3 +93,3 @@ | ||
var tests = { | ||
countProperties: testCountProperties, | ||
testCountProperties: testCountProperties, | ||
overwrite: testOverwriteObject, | ||
@@ -104,0 +96,0 @@ }; |
{ | ||
"name": "prototypes", | ||
"version": "0.0.3", | ||
"version": "0.1.1", | ||
"description": "Some common prototypes for node.js: string.startsWith(), object.countProperties() and more. Functions are added using Object.defineProperty() to avoid polluting new objects.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/prototypes", |
@@ -10,8 +10,4 @@ 'use strict'; | ||
var testing = require('testing'); | ||
var Log = require('log'); | ||
// globals | ||
var log = new Log('info'); | ||
/** | ||
@@ -41,3 +37,2 @@ * Test that a new object is clean: has no functions. | ||
{ | ||
log.debug('Running tests'); | ||
var tests = { | ||
@@ -44,0 +39,0 @@ cleanObjects: testCleanObjects, |
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
17014
428