Package Exports
- git-shas
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-shas) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
#git-shas 
This module returns the list of all shas (git commit hashes) from a git repository.
Installation
> npm install git-shas
Usage
'use strict';
const gitShas = require('git-shas');
const result = gitShas();
console.log( result ); // =>
/*
* [ '7e516c2174b71c9edb24c9453e4e871369ef4ede',
* 'f6d52ca6fead555e8b460554b7b137bda53a0879',
* 'b452179b197a548707ca52b21f17b10dd39025ab',
* ....
*/
// To get the HEAD > grab first value in the array
const HEAD = result[0]
console.log(HEAD); // => '7e516c2174b71c9edb24c9453e4e871369ef4ede'
Raison d'être
Created the package primarily because of issues from a related package. The owner didn't bother to fix them so this package serve as a replacement and gives you more flexibility (all shas from HEAD to initial commit) without any mental overhead. perf average 200ms on electron (~= 9,460 shas)
Super Light (5 sloc). No dependencies, no mental overhead, time saver.