Package Exports
- current-git-branch
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 (current-git-branch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
current-git-branch
Get synchronously the current branch name
Installation
$ npm i current-git-branch --save
or
$ yarn add current-git-branch
Usage
Returns:
- Boolean
false
: It is not a git repository - String: The branch name
const branchName = require('current-git-branch');
branchName(); // false or branch name of process.cwd()
branchName('any/git/repo'); // false or branch name of the directory 'any/git/repo'
LICENSE
MIT © Jan Peer Stöcklmair