Socket
Book a DemoInstallSign in
Socket

r4y

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r4y

A NodeJS library for managing child processes

0.9.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

r4y

A typescript library for spawning and executing child processes.

Implementation

A common implementation is the following:

import ray from 'r4y';

const response = await ray.execute('echo $WHATEVER');
console.log(response);

await ray.spawn('find . -type f | wc');

Configuration

import ray from 'r4y';
ray.config.set({
  debug: false,
  spin: false,
  spawn: {
    log: {
      stdout: 'trace',
      stderr: 'error',
    }
  },
});

Configuration parameters

Parameter nameParameter typeParameter description
debugbooleanWheater or not to console log debugging information like child ID
spinbooleanWheater or not to show a spinning console log
spawn.log.stdoutLogMethodHow the child process should log its stdout
spawn.log.stderrLogMethodHow the child process should log its stderr
type LogMethod = 'trace' | 'debug' | 'info' | 'warn' | 'error';

Unix philosophy

This repo try to follow the Unix philosophy.

Name

r4y stands for ray, like in Radioactive ray.

3xp A typescript library for validating objects.

i0n A typescript library for console logging.

w3i A typescript library for handling configurations.

FAQs

Package last updated on 20 Jan 2025

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.