free2o

1.0.0 • Public • Published

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 free command output

free2o object

free2o object

compatible options

  • -b
  • -k
  • -m
  • -g
  • --tera
  • -h
  • -si
  • -l
  • -t
  • -w

Package Sidebar

Install

npm i free2o

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • adel.mahjoub