You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 month ago | |
---|---|---|
.gitignore | 1 month ago | |
README.md | 1 month ago | |
mod.js | 1 month ago | |
package.json | 1 month ago |
README.md
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.