last-git-commit-id
v0.1.0
Published
Asynchronously or synchronously get the last Git commit ID.
Downloads
3
Readme
last-git-commit-id
Asynchronously or synchronously get the last Git commit ID.
Usage
Asynchronous
import {
getLastGitCommitId
} from 'last-git-commit-id';
(async () => {
console.log(await getLastGitCommitId());
})();
Synchronous
import {
getLastGitCommitIdSync
} from 'last-git-commit-id';
console.log(getLastGitCommitIdSync());
Inspired by answers to the Get hash of most recent git commit in Node question on StackOverflow, but using the newer & simpler syntax.