git-or-svn

0.1.1 • Public • Published

Git or SVN

Test whether a folder path is part of a git or SVN repository.

var gitorsvn = require('git-or-svn');
 
gitorsvn( __dirname, function(gitorsvn) {
    if ( gitorsvn === 'git' ) {
        // It's a git repo!
    } else if ( gitorsvn === 'svn' ) {
        // It's an svn repo!
    } else {
        // It's neither!
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i git-or-svn

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • ericandrewlewis