Created
October 21, 2014 11:18
-
-
Save montanaflynn/f1c695bcf874747be9b9 to your computer and use it in GitHub Desktop.
Node.js host operating system info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var os = require('os') | |
var response = {} | |
for (property in os) { | |
if (typeof os[property] === 'function') { | |
response[property] = os[property]() | |
} else { | |
response[property] = os[property] | |
} | |
} | |
console.log(JSON.stringify(response,null,2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment