Gathering detailed insights and metrics for git-username
Gathering detailed insights and metrics for git-username
Gathering detailed insights and metrics for git-username
Gathering detailed insights and metrics for git-username
Extract the username from a git remote origin URL.
npm install git-username
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.9
Supply Chain
97.7
Quality
74.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
12,291,494
Last Day
2,543
Last Week
50,993
Last Month
257,175
Last Year
3,786,458
MIT License
17 Stars
29 Commits
3 Forks
3 Watchers
1 Branches
4 Contributors
Updated on Sep 17, 2024
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
git-username@1.0.0
Size
3.21 kB
NPM Version
5.6.0
Node Version
9.7.1
Published on
Mar 03, 2018
Cumulative downloads
Total Downloads
Last Day
-56.9%
2,543
Compared to previous day
Last Week
-23.6%
50,993
Compared to previous week
Last Month
-6.4%
257,175
Compared to previous month
Last Year
28.9%
3,786,458
Compared to previous year
2
2
Get the username (or 'owner' name) from a git/GitHub remote origin URL.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
1$ npm install --save git-username
If no arguments are passed, the .git/config
in the current working directory is used.
1var username = require('git-username'); 2console.log(username()); //=> jonschlinkert
Type: string
Default: process.cwd()
Set the current working directory (cwd):
Examples
1username({ cwd: 'some/path' }); 2 3// cwd may also be passed as the first argument 4username('some/path');
Type: boolean
Default: undefined
Throw an error when a git config or git remote origin cannot be resolved. Otherwise, when strict
is not true and a remote origin cannot be resolved, null
is returned.
Example
1username({ strict: true });
Breaking changes
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
.git/config
into a JavaScript object. sync or async. | homepageCommits | Contributor |
---|---|
21 | jonschlinkert |
1 | davisjam |
1 | jamo |
Jon Schlinkert
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on March 02, 2018.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More