Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 376 Bytes

File metadata and controls

18 lines (11 loc) · 376 Bytes

View on StackOverflow ..

Definitely, the easiest way to do it is using username

Install:

$ npm install username

Then:

const username = require('username');

(async () => {
    console.log(await username());
	//=> 'current_username'
})();