A wrapper around the uname call.
Works on GNU/Linux and MacOS.
npm install node-unameconst { uname } = require('node-uname')
console.log(uname())
// Utsname {
// sysname: 'Darwin',
// nodename: 'MacBook.local',
// release: '15.0.0',
// version: 'Darwin Kernel Version ...',
// machine: 'x86_64' }The uname() function returns an object containing sysname, nodename, release, version and machine.
If the internal call to the kernel's uname function fails an Error is thrown.