Merge pull request #35 from aviskarkc10/master

Add the javascript way
This commit is contained in:
Luke Stephens (hakluke) 2019-10-01 02:47:27 +10:00 committed by GitHub
commit a2d47840b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -260,3 +260,16 @@ Run vim inside Termux and run this when you want to exit:
```
:!su -c killall zygote
```
## The JavaScript way
```
const ps = require('ps-node');
ps.lookup({ command: 'vim' }, function(error, resultList) {
resultList.forEach(function(process) {
if (process) {
ps.kill(process.pid);
}
});
});
```