JSPM

is-git-added

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 582
  • Score
    100M100P100Q95040F
  • License MIT

A tool to check if files are added in a git repository

Package Exports

  • is-git-added

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-added) 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-added

Build Status Coverage Status

Checks synchronously if files are added in a git repository

Installation

$ npm i is-git-added --save

or

$ yarn add is-git-added

Usage

  • false: Nothing is added/in the HEAD, or it is no git repository
  • true: Changes are ready to commit. Files are added.
const isGitAdded = require('is-git-added');

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

LICENSE

MIT © Jan Peer Stöcklmair