npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nativescript-childprocess

v1.0.0

Published

A NativeScript plugin that allows access to creating and running Java Processes in Android using Node.js child process style.

Readme

Child Process (NativeScript Plugin)

A NativeScript plugin for creation and execution of Android java.lang.Processes in Node.js child process style! As a webapp developer, you needn't worry about familiarizing yourself with the Java Process API, thanks to this plugin.

Installation

  • For NativeScript 7+:
ns plugin add nativescript-childprocess
  • For NativeScript versions < 7:
tns plugin add [email protected]

Usage

  • The simplest implementation looks like so:
import { ChildProcess } from 'nativescript-childprocess'
...
onClickRun() {
  ChildProcess.run('pm list packages')
    .then(output => { console.log('Success:', output) })
    .catch(error => { console.log('Failure:', error) })
}
  • A slightly advanced implementation with an interactive shell would look like so:
import { ChildProcess } from 'nativescript-childprocess'
...
async onClickRun() {
  let childProcess: ChildProcess = new ChildProcess('su')
  childProcess.runInteractive('ls /system/')
  childProcess.runInteractive('ls /system/bin/')
  await childProcess.closeSafely('exit')
  console.log(childProcess.getOutput())  // output of both `ls` commands
}

API

constructor(startCommand: string)

Creates an interactive shell session.

  • Parameters: startCommand — interactive shell command (su is an example of one).

getErrors(): any

Returns errors that have been collected from the onset of this process execution (i.e. right from creation of the interactive shell session) up until now.

clearErrors(): void

Clears errors collected from the onset of this process execution up until now. Helps if errors until this point in time are irrelevant.

getProcess(): java.lang.Process

Exposes the underlying Java process to not be confined by the bounds of the ChildProcess plugin. Helps in cases where outputs of commands running in an interactive shell have to collected and processed as and when available.

  • Returns: — native Java process.

getOutput(): string

  • Returns: — output collected in course of execution of this process up until now.

    (For errors, check out getErrors()).

static run(param0: string): Promise<any> + 4 overloads

Executes a single command on a local terminal / shell (pm list packages for instance).

  • Parameters: param0 — command to be executed.

  • Returns: — promise that resembles that of Node.js child process that resolves to an output or

    rejects with an error.

runInteractive(command: string): ChildProcess

Runs commands inside of an interactive shell.

  • Parameters: command — sub-command is run inside the interactive shell created while

    instantiating ChildProcess.

  • Returns:ChildProcess reference which allows for cascaded runInteractive() or

    used to display the output or any errors.

closeSafely(exitCommand: string): Promise<ChildProcess>

Safely closes an interactive shell by running an exit command passed as a parameter.

  • Parameters: exitCommandexit.

  • Returns: — promise that resolves to a ChildProcess and can be used to display the

    output or any errors.

closeAbruptly(): Promise<ChildProcess>

Abruptly closes an interactive shell (which, for instance, is unresponsive such as a failing network activity) by killing it.

  • Returns: — promise that resolves to a ChildProcess and can be used to display the

    output or any errors.

toString(): string

  • Returns: — output of the entire process and any errors.

Made with :heart: by theGeekyLad