Socket
Socket
Sign inDemoInstall

rasper

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

18

index.js

@@ -22,2 +22,6 @@ module.exports = (args = process.argv.slice(1)) => {

function exist (value) {
return value ? true : false
}
function getValue (value, index, self) {

@@ -35,8 +39,10 @@ const next = self[index + 1]

}
if (hasDash(value) && !hasEgual(value) && hasDash(next)) {
return value + '=' + 'true'
if (hasDash(value) && !hasEgual(value)) {
if (hasDash(next) || !exist(next)) {
return value + '=' + 'true'
}
if (!hasDash(next) && hasEgual(next)) {
return value + '=' + next
}
}
if (hasDash(value) && !hasEgual(value) && !hasDash(next) && hasEgual(next)) {
return value + '=' + next
}

@@ -69,3 +75,3 @@ return value

if (!isNaN(value)) {
return parseInt(value)
return Number(value)
}

@@ -72,0 +78,0 @@

{
"name": "rasper",
"version": "0.2.0",
"version": "0.2.1",
"description": "Node.js parse argument options make ease.",

@@ -5,0 +5,0 @@ "homepage": "https://cjpatoilo.com/rasper",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc