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.
 
KaKi87 0520b8d6d3
🎉 Initial commit
1 month ago
.gitignore 🎉 Initial commit 1 month ago
README.md 🎉 Initial commit 1 month ago
mod.js 🎉 Initial commit 1 month ago
package.json 🎉 Initial commit 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.