New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-is-prime

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-is-prime - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

6

CHANGELOG.md
# just-is-prime
## 2.2.0
### Minor Changes
- Skip even numbers when looking for primes
## 2.1.1

@@ -4,0 +10,0 @@

6

index.js

@@ -25,3 +25,7 @@ module.exports = isPrime;

for (var i = 2; i <= Math.sqrt(number); i++) {
if (number % 2 === 0) {
return (number === 2);
}
for (var i = 3; i <= Math.sqrt(number); i += 2) {
if (number % i === 0) {

@@ -28,0 +32,0 @@ return false;

2

package.json
{
"name": "just-is-prime",
"version": "2.1.1",
"version": "2.2.0",
"description": "Check if number is prime",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc