Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fullname

sindresorhus1.3mMIT5.0.0TypeScript support: included

Get the fullname of the current user

name, fullname, realname, full name, surname, full, real, given, user, gecos, pwuid, uid

readme

fullname

Get the full name of the current user

Works on macOS, Linux, and Windows.

Install

npm install fullname

Usage

import fullName from 'fullname';

console.log(await fullName());
//=> 'Sindre Sorhus'

In the rare case a name cannot be found, you could fall back to username.