free2o
v1.0.0
Published
convert linux/unix free command output to a javascript object
Downloads
2
Maintainers
Readme
free2o
Convert the output of the linux/unix free command to a javascript object.
$ npm install free2o
const { spawn } = require('child_process');
const free2o = require('free2o');
const free = spawn('free', ['-htw']);
let data = '';
free.stdout.on('data', chunk => {
data = data.concat(chunk);
});
free.stdout.on('end', () => {
console.log(data);
console.log(free2o(data));
});
free command output
free2o object
compatible options
- -b
- -k
- -m
- -g
- --tera
- -h
- -si
- -l
- -t
- -w