grand-array
Advanced tools
Comparing version 1.0.0 to 1.0.2
18
index.js
@@ -224,3 +224,21 @@ module.exports = { | ||
return count; | ||
}, | ||
countOfPrime : function(arr){ | ||
for(let i = 2; i*i < arr.length; i++){ | ||
if(arr[i] !== "nope"){ | ||
for(let j = i*i; j < n; j += i){ | ||
arr[j] = "nope" | ||
} | ||
} | ||
} | ||
var primes = []; | ||
for(let i = 0; i < arr.length; i++) { | ||
if(arr[i] > 1){ | ||
primes.push(arr[i]) | ||
} | ||
} | ||
return primes.length; | ||
} | ||
} |
{ | ||
"name": "grand-array", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "Easy to use Array Manipulator with tons of Array Operations", | ||
@@ -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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
9517
3
238
1
116