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

ps-promise

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ps-promise

ps command wrapper. Promise implementation on top of github.com/neekey/ps

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-ps-promise

node-ps-promise is ps tool wrapper implementing promises.

node-ps-promise wraps neekey's node-ps-promise library

Installation

Install with npm.

npm install node-ps-promise

or Clone from github

git clone http://github.com/sgen/node-ps-promise

Usage

For full usage see neekey's ps-node library. lookup and kill function identically with the exception of the replacement of the callbacks with promises;

Lookup a process

var ps = require('ps-promise');

ps.lookup({
  pid: 123
}).then(function(results) {
    for (i = 0; i < results.length; i++) {
      console.log('Result %s: %s', i, results[i])
    }
}).catch(function(err) {
  console.error(err);
});

Kill a process

var ps = require('ps-promise');

ps.kill(123).then(function(pid) {
    console.log(pid);
}).catch(function(err) {
  console.error(err);
});

FAQs

Package last updated on 19 Jan 2016

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