JSPM

is-git-dirty

2.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 124618
  • Score
    100M100P100Q172284F
  • License MIT

Check if a repository has untracked or added files

Package Exports

  • is-git-dirty
  • is-git-dirty/dest/index.js

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 (is-git-dirty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-git-dirty

Build Status Build status Coverage Status

Checks synchronously if the git repository is clean. This assumes that no files are added, untracked or modified.

Installation

$ npm i is-git-dirty --save

or

$ yarn add is-git-dirty

Usage

Returns:

  • null: Directory is not a git repository
  • true: Files are added, untracked or modified
  • false: No files are added, untracked or modified. Git is clean
import isGitDirty from 'is-git-dirty';

isGitDirty(); // true or false of process.cwd()
isGitDirty('any/git/repo'); // true or false

LICENSE

MIT © Jan Peer Stöcklmair