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

terminate

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminate - npm Package Compare versions

Comparing version 2.1.0 to 2.1.2

8

package.json
{
"name": "terminate",
"version": "2.1.0",
"version": "2.1.2",
"description": "Terminate a Node.js Process based on the Process ID",

@@ -9,3 +9,4 @@ "main": "terminate.js",

"coverage": "npm test && istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
"jshint": "./node_modules/jshint/bin/jshint -c .jshintrc --exclude-path .gitignore ."
"jshint": "./node_modules/jshint/bin/jshint -c .jshintrc --exclude-path .gitignore .",
"lint": "node_modules/.bin/goodparts terminate.js"
},

@@ -30,6 +31,7 @@ "repository": {

"dependencies": {
"ps-tree": "^1.1.0"
"ps-tree": "^1.1.1"
},
"devDependencies": {
"chalk": "^1.1.1",
"goodparts": "1.2.1",
"istanbul": "^0.4.5",

@@ -36,0 +38,0 @@ "jshint": "^2.9.1",

@@ -13,2 +13,3 @@ # terminate

[![Dependency Status](https://david-dm.org/dwyl/terminate.svg)](https://david-dm.org/dwyl/terminate)
[![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/dwyl/goodparts "JavaScript The Good Parts")

@@ -15,0 +16,0 @@

@@ -0,1 +1,3 @@

'use strict';
var psTree = require('ps-tree'); // see: http://git.io/jBHZ

@@ -9,16 +11,20 @@ var handlePsTreeCallback = require('./handlePsTreeCallback');

* @param {int} pid - the Process ID you want to terminate
* @param {string=SIGTERM} signal (optional) - the signal to kill the processes
* @param {string} [signal=SIGTERM] - the signal to kill the processes
* with.
* @param {object={}} options
* @param {number=500} options.pollInterval - interval to poll whether pid
* @param {object} [options={}] - options object
* @param {number} [options.pollInterval=500] - interval to poll whether pid
* and all of the child pids have been killed.
* @param {number=5000} options.timeout - max time to wait for processes to
* @param {number} [options.timeout=5000] - max time to wait for processes to
* exit before timing out and calling back with an error.
* @param {function=} callback (optional) - if you want to know once the
* @param {function=} callback - if you want to know once the
* procesess have been terminated, supply a callback.
* @param {Error} error - will be null if no error occured
* @param {Error} error - will be null if no error occured
* @returns {void}
*/
module.exports = function terminate(pid) {
if(!pid) {
throw new Error("No pid supplied to Terminate!")
module.exports = function terminate (pid) {
var i = 1;
var signal, options, callback;
if (!pid) {
throw new Error('No pid supplied to Terminate!');
}

@@ -28,4 +34,2 @@

// ones present have to be in the
var i = 1;
var signal, options, callback;
if (typeof arguments[i] === 'string') {

@@ -32,0 +36,0 @@ signal = arguments[i++];

Sorry, the diff of this file is not supported yet

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