psedit
v2.0.3
Published
edit processes list
Downloads
6
Readme
psedit
Edit processes list
Install
npm i psedit
API
get
Get list of processes.
const {get} = require('psedit');
get()
.then(console.log)
.catch(console.error);
// returns
[[
1337,
'59.53mb',
'0.1',
'*node',
'node',
]];
build
Build processes table.
const {get, build} = require('psedit');
get()
.then(build)
.catch(console.error);
// returns
'1337 59.53mb 0.1 *node node\n';
pulloutPids
Get pids from built table
const {
get,
build,
pulloutPids,
} = require('psedit');
get()
.then(build)
.then(pulloutPids)
.catch(console.error);
// returns
[1337]
kill
Kill processes
const {kill} = require('psedit');
kill([1, 2, 3]);
diff
Diff pids.
const {diff} = require('psedit');
diff([1, 2, 3], [1, 3]);
// returns
[2]
License
MIT