constosenv=require('osenv')constpath=osenv.path()constuser=osenv.user()// etc.// Some things are not reliably in the env, and have a fallback command:leth=osenv.hostname(function(er,hostname){h=hostname})// This will still cause it to be memoized, so calling osenv.hostname()// is now an immediate operation.// You can always send a cb, which will get called in the nextTick// if it's been memoized, or wait for the fallback data if it wasn't// found in the environment.osenv.hostname(function(er,hostname){if(er)console.error('error looking up hostname')elseconsole.log('this machine calls itself %s',hostname)})