2.1.4 • Published 10 years ago
os-user v2.1.4
os-user 
Simple node.js util that returns the user currently running on the system.
On windows this util is aware of the domain using the USERDOMAIN and USERNAME variable.
On other systems it uses the USER environment variable. If the USER is not given or empty on other systems it will fallback to whoami.
Usage
Install with:
$ npm i os-user --saveand use it with:
var user = require('os-user')
user(function (err, usr) {
console.log(usr)
})cheers.
Caching & Invalidation
By default the user is cached for 10 minutes it is possible to invalidate the cache using:
user.invalidate()License
first version extracted from osenv