Socket
Book a DemoInstallSign in
Socket

expr-exit-code

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expr-exit-code

Evalutes a CLI parameter expression and exits with exit codes based on the boolean outcome of that expression.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

expr-exit-code

Really simple npm CLI module for evaluating CLI parameters and exit a process based on the expressions output (all truthy values = exit code 0, else is exit code 1).

Dev

$ npm install
$ npm dedupe // if npm < 3
$ npm run build

Usage

Replace expr-exit-code with node dist/index.js if in development.

$ npm install -g expr-exit-code

// 5>6 is false, exit code 1:
$ expr-exit-code -e "5>6"

// 0 is falsy, exit code 1:
$ expr-exit-code -e "1-1"

// message if expression is truthy:
$ expr-exit-code -e "1+1" -t "It is truthy"

// message if expression is falsy:
$ expr-exit-code -e "0+0" -t "It is falsy"

FAQs

Package last updated on 20 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.