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

@homeofthings/node-sys

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homeofthings/node-sys

HomeOfThings - fluent API for spawning child processes and shell-like filesystem function

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm version Build Workflow Coverage Status DeepScan grade Known Vulnerabilities

PRs Welcome License

@homeofthings/node-sys

This library is mainly intended to be helpful for build and installation tasks. It includes a Fluent API for spawning child processes and many file-system related functions that work and are named similarly to their shell counterparts.

Fluent API for spawning child processes

const out: string[] = [];
await exec('node', '-e', `console.log("hello world")`).setStdOut(out).run();
const script: string[] = [`console.log("hello world")`];
await exec('node').setStdIn(script).run();
const out: string[] = [];
await sh('ls -l *.md').setStdOut(out).run();
const out: string[] = [];
await pipe(sh('ls -l *.md')).to(exec('wc', '-l').setStdOut(out)).run();
// out[0] contains the number of *.md files as string

file-system related functions that work and are named similarly to their shell counterparts, e.g.: cd, pwd, pushd, popd, dirs, realpath, stat, which, unlink, ln, mktemp, chmod, chown, mkdir, rm, rmdir, touch, cp, mv, rename, ...

await rm('myfile.bak');
await rm(['myfile.bak', 'mytmpdir'], { recursive: true, force: true });
await rm(glob('**/*.bak'));

Keywords

FAQs

Package last updated on 26 Oct 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