Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Tools for parsing data out of git repositories.
The goal of node-git-tools is to provide a set of tools that can be used to easily write custom git commands or other scripts that are tightly integrated with git.
I expect the API to grow over time and will happily entertain any feature requests. If there is anything you'd like added, just file an issue.
npm install git-tools
var Repo = require( "git-tools" );
var repo = new Repo( "path/to/repo" );
repo.authors(function( error, authors ) {
console.log( authors );
});
Gets the number of active days (unique days of authorship). Includes activity by day, month, year, and the entire history.
committish
(String; default: "master"
): Committish range to analyze.callback
(Function; function( error, activeDays )
): Function to invoke after getting active days.
activeDays
(Object): Summary of active days.The activeDays
object has the following form:
{
activeDays: Number,
commits: Number,
dates: {
"YYYY-MM-DD": Number( commits ),
...
},
years: {
"YYYY": {
activeDays: Number,
commits: Number,
months: {
"M": {
activeDays: Number,
commits: Number,
days: {
"D": {
commits: Number
},
...
}
},
...
}
},
...
}
}
Gets the age of the repository.
callback
(Function; function( error, age )
): Function to invoke after getting the age.
age
(String): The age of the repository.Gets all authors, sorted by number of commits.
committish
(String; default: "master"
): Committish range to analyze.callback
(Function; function( error, authors )
): Function to invoke after getting authors.
authors
(Array): All authors, sorted by number of commits.Each author object contains the following properties:
email
(String): Author's email address.name
(String): Author's name.commits
(Number): Number of commits.commitsPercent
(Number): Percentage of commits.Gets all tags in reverse chronological order.
Lightweight tags are sorted by author date and annotated tags are sorted by tagger date.
callback
(Function; function( error, tags )
): Function ot invoke after getting tags.
tags
(Array): All tags, sorted by date.Each tag object contains the following properties:
name
(String): Tag name.date
(Date): Author date for ligthweight tags, tagger date for annotated tags.Copyright 2013 Scott González. Released under the terms of the MIT license.
FAQs
Tools for parsing data out of git repositories.
The npm package git-tools receives a total of 12,823 weekly downloads. As such, git-tools popularity was classified as popular.
We found that git-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.