git-toplevel

1.1.1 • Public • Published

NPM Version Build Status

git-toplevel

Method to find the top level git directory

Install

npm i --save git-toplevel

Usage

var gitTopLevel = require('git-toplevel');
 
gitTopLevel().then(function(dir) {
  // dir ===> the git root 
}).catch(function(err) {
  // err ===> any error that happen when trying to get the top level dir
});

Lincense

MIT

Changelog

/git-toplevel/

    Package Sidebar

    Install

    npm i git-toplevel

    Weekly Downloads

    4,089

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • royriojas