Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-git-clean

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-git-clean

Find out if a git directory is clean or not

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39K
decreased by-12.6%
Maintainers
1
Weekly downloads
 
Created
Source

is-git-clean Build Status

Find out if a git directory is clean or not

Install

$ npm install --save is-git-clean

Usage

const isGitClean = require('is-git-clean');

isGitClean().then(clean => console.log(clean));
//=> true || false

// alternate directory
isGitClean('/some/path')

// options
// `ignore.txt` is ignored and not counted as dirty
isGitClean('/some/path', {files: ['!ignore.txt']})

// sync version
isGitClean.sync()

API

isGitClean([dir], [options])

Returns a promise for a boolean value. true if the directory is clean, false if it is not.

dir

Type: string
Default: process.cwd()

Path to the directory you want to check.

options

Type: object

files

Type: array

An array of multimatch patterns to ignore certain files.

isGitClean.sync([dir], [options])

Synchronous version, with the same API as above. Returns a boolean directly, instead of a Promise.

License

MIT © James Talmage

Keywords

FAQs

Package last updated on 21 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc