Get the fullname of the current user
$ npm install --save fullname
Tested on OS X, Linux and Windows.
var fullname = require('fullname');
fullname(function (err, name) {
console.log(name);
//=> Sindre Sorhus
});
In the rare case a name can't be found you could fall back to username
.
$ npm install --global fullname
$ fullname --help
Example
$ fullname
Sindre Sorhus
See username to get the username of the current user.
MIT © Sindre Sorhus