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

snorun

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snorun

Run & interact with shell command like in node without pain.

  • 1.1.15
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
107
increased by137.78%
Maintainers
1
Weekly downloads
 
Created
Source

snorun

Run & interact with shell command like in node without pain.

Feat

  • Returns true if command exited with code 0 and otherwise false.
  • pipe stdin and stdout and stderr with your main process

Usage

If you like to do this in shell,

echo command && echo succ || echo fail

then you can convert them into javascript

import snorun from "snorun";

const result =
  ((await snorun("echo command")) && (await snorun("echo succ"))) || (await snorun("echo fail"));

// result = true

// and your console will show like this
// > command
// > succ

About

License

GPLv3 - The GNU General Public License v3.0 - GNU Project - Free Software Foundation

Author

Author: snomiao snomiao@gmail.com Website: snomiao.com

Sponsors

  • None yet.

Claim your sponsorship by donating snomiao <Email: snomiao@gmail.com>

Contribute

The main repo is in here, any issue and PR's welcome.

Keywords

FAQs

Package last updated on 15 Jul 2022

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

  • 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