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

croatia

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croatia

Spawn a process and clear its output when succeded.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

croatia

NPM version NPM downloads travis donate chat

Motivation

You want to clear the output of a child process when it exits without error, otherwise persist the output.

Install

yarn add croatia

Usage

const { spawn } = require('croatia')

spawn('npm', ['install', 'pokemon', '--verbose'])

Preview

This preview demonstrates:

  • A successful npm install, the output will be cleared when succeeded.
  • A failed yarn install, the output error will be persisted.

API

spawn(cmd, [args], [options])

Almost identical to child_process.spawn.

Returns a Promise which resolves to the created child process, the Promise will never be rejected.

options

All options in child_process.spawn are available here, plus:

  • options.stdio is always [process.stdin, 'pipe', 'pipe']
  • options.banner: string Output a message before the process is spawned.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

croatia © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

github.com/egoist · GitHub @egoist · Twitter @_egoistlily

FAQs

Package last updated on 09 Sep 2018

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