$ cnpm install fullname
Get the full name of the current user
$ npm install fullname
Tested on macOS, Linux, and Windows.
const fullName = require('fullname');
(async () => {
console.log(await fullName());
//=> 'Sindre Sorhus'
})();
In the rare case a name can't be found, you could fall back to username.
MIT © Sindre Sorhus
Copyright 2013 - present © cnpmjs.org | Home |