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

nano-spawn

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nano-spawn

Tiny process execution for humans — a better child_process

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
increased by19.79%
Maintainers
0
Weekly downloads
 
Created
Source

nano-spawn logo

Tiny process execution for humans — a better child_process

[!WARNING] This package is still a work in progress.

Check out execa for more features.

Features

  • Outputs combined result of stdout and stderr, similar to what you get in terminals
  • Outputs lines
  • No dependencies

Install

npm install nano-spawn

Usage

import $ from 'nano-spawn';

const result = await $('echo', ['🦄']);

console.log(result.exitCode);
//=> 0
import $ from 'nano-spawn';

for await (const line of $('ls', ['--oneline'])) {
	console.log(line);
}
//=> index.d.ts
//=> index.js
//=> …

API

See the types for now.

Limitations

  • It does not handle binary output. Use execa for that.
  • execa - Process execution for humans
  • unicorn-magic - Slightly improved child_process#execFile

Keywords

FAQs

Package last updated on 19 Aug 2024

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