Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cb-interview-demo

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cb-interview-demo - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

16

bin/foo.js

@@ -5,2 +5,18 @@ #!/usr/bin/env node

const minimumVersion = '18.11'
function isNodeLT (version) {
const check = version.split('.').map(Number)
const node = process.versions.node.split('.').map(Number)
if(check[0] < node[0]) return true
if(check[0] === node[0] && (check[1] && check[1] < node[1])) return true
if(check[0] === node[0] && check[1] === node[1] && (check[2] && check[2] < node[2])) return true
return false
}
if (isNodeLT(minimumVersion)) {
console.error(`Node version must be ${minimumVersion} or greater.`)
process.exit(1)
}
run()

2

package.json
{
"name": "cb-interview-demo",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

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