GitShow/sindresorhus/username
sindresorhus

username

Get the username of the current user

by sindresorhus
Star on GitHubForknpm

JavaScript

146 stars16 forks9 contributorsQuiet · 2y agoSince 2014v7.0.0MIT

Meet the team

See all 9 on GitHub →
sindresorhus
sindresorhus45 contributions
sonicdoe
sonicdoe2 contributions
sonnyp
sonnyp2 contributions
arthurvr
arthurvr1 contribution
BendingBender
BendingBender1 contribution
elvinn
elvinn1 contribution
kevva
kevva1 contribution
raido
raido1 contribution

Languages

View on GitHub →
JavaScript94.7%
TypeScript5.3%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
barbalex
returning undefined in .exe app-installer built by electron-builderClosedIssue

I am using username for an electron app. Inside index.js I tried to import it: That did not go well: So I followed vite's advice and dynamically imported: That seemed to work fine, i.e. userName is , as expected. In dev mode. And also: When using the .exe created in the folder of the release (built by electron-builder). Here is where things get puzzling. I then used the .exe app-installer created by electron-builder to install the app. When _this_ app is opened, userName is . Why could this be?

barbalex · 3y ago
Richienb
Move to GitHub ActionsMergedPR
Richienb · 5y ago
UgmaDevelopment
Clarification about working in the browserClosedIssue

Hello! After playing around a bit with your package (in the browser), I realized that it may or may not have been designed to get the username in the context of a browser. My question is, "Is this package able to get usernames in the browser at all?" I can't seem to get it to work in Windows 10, and I have a suspicion that it can't on any OS, but I'm not familiar with Linux or Mac browsers, so I thought I'd ask before assuming. The more I write, the more I feel rather silly for trying so long at it... ಠ_ಠ Maybe I could add a line to the README to clarify to my fellow knaves that this package was designed to only get a username from non-browser apps. Give me a hand, what would such node applications be called that don't run in the browser? Desktop applications? Command line apps? Are there non-browser, non-command-line apps in Node? I appreciate you humoring me.

UgmaDevelopment · 6y ago
Structured data for AI agents

Repository: sindresorhus/username. Description: Get the username of the current user Stars: 146, Forks: 16. Primary language: JavaScript. Languages: JavaScript (94.7%), TypeScript (5.3%). License: MIT. Latest release: v7.0.0 (2y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 71%. Top contributors: sindresorhus, sonicdoe, sonnyp, arthurvr, BendingBender, elvinn, kevva, raido, Richienb.

·@ofershap

Replace github.com with gitshow.dev