🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

blamejs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blamejs

Parse git blame -p output

1.0.0
latest
Source
npm
Version published
Weekly downloads
893
-20.83%
Maintainers
1
Weekly downloads
 
Created
Source

#Git Blame parser in JavaScript

This module parses the output from a "git blame -p" (for porcelain, i.e. machine-digestible) operation.

#Usage

var BlameJS = require("blamejs");
var blamejs = new BlameJS();

// Get the result of the git blame operation
var blameOut = "[output]";

blamejs.parseBlame(blameOut);

// Get the commit data
var commitData = blamejs.getCommitData();

// Get the line data array, each item containing a reference to
// commits that can be then referenced in commitData
var lineData = blamejs.getLineData();

var firstLine = commitData[lineData[0].hash];
// firstLine now has:
// - author
// - authorMail
// - authorTime
// - authorTz
// - committer
// - committerMail
// - committerTime
// - committerTz 
// - summary
// - previousHash
// - filename

Keywords

git

FAQs

Package last updated on 19 Sep 2014

Did you know?

Socket

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.

Install

Related posts