Get the fullname of the current user
$ npm install --save fullname
Tested on macOS, Linux, and Windows.
const fullname = require('fullname');
fullname().then(name => {
console.log(name);
//=> 'Sindre Sorhus'
});
In the rare case a name can't be found, you could fall back to username
.
- fullname-cli - CLI for this module
- fullname-native - Native version of this module
- username - Get the username of the current user
MIT © Sindre Sorhus