2.1.4 • Published 8 years ago

os-user v2.1.4

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

os-user Build Status

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 --save

and 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

ISC

first version extracted from osenv

2.1.4

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago