check if a git repository has uncommitted changes
$ npm install --save is-index-clean
const isIndexClean = require('is-index-clean');
isIndexClean.then(() => {
console.log('index clean');
}, () => {
console.log('index not clean');
});
Returns a Promise, which will be fulfilled if the index is completely clean and rejected otherwise.
MIT © JM Versteeg