1.0.1 • Published 6 years ago
js-top v1.0.1
Intruduce
- js-top is a javascript tool for linux / osx top shell command listener.
How to
// subscribe top
const top = require('js-top');
const unsubscribe = top.subscribe(function (data) {
const { task, cpu, ram, swap, process, time } = data;
...
});
// unsubcribe top
unsubscribe();