{"_id":"current-git-branch","_rev":"9-22851999f9e329472d415a3de6b1065a","name":"current-git-branch","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"current-git-branch","version":"1.0.0","keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","_id":"current-git-branch@1.0.0","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"ava":{"babel":"inherit","require":"babel-register"},"nyc":{"exclude":["build.js","test.js"]},"dist":{"shasum":"2eff7b84b5b15d2e896d6b0d82355ac25ae73461","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-1.0.0.tgz","integrity":"sha512-uI3II0evhv7W1dGe1tGBhHuWsKmag/LhdrC4C26m9vcLqQJjkr9yqCCjGFhZ+bPBeGxodTOEOuuV1RuCzP1spw==","signatures":[{"sig":"MEQCIEocHXfWNwYB7BC7IAXq+WBtD23gld7VGgmjjxtMEkWJAiBRHeg0bpp0SNYxrFBqyhF/VIwonFRDzkuNTEyOniypew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build.js","_from":".","_shasum":"2eff7b84b5b15d2e896d6b0d82355ac25ae73461","gitHead":"0779d69a12e0850be2ec89cc224fa8026928d323","scripts":{"lint":"eslint index.js","test":"nyc ava","babel":"babel index.js -o build.js","prepush":"npm test","pretest":"npm run lint","coveralls":"nyc report --reporter=text-lcov | coveralls","prepublish":"npm run babel"},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"repository":{"url":"git+https://github.com/JPeer264/node-current-git-branch.git","type":"git"},"_npmVersion":"3.10.10","description":"A tool to check if files are added in a git repository","directories":{},"_nodeVersion":"6.10.0","dependencies":{"execa":"^0.6.1","is-git-repository":"^1.0.0"},"devDependencies":{"ava":"^0.18.2","nyc":"^10.1.2","husky":"^0.13.2","is-ci":"^1.0.10","eslint":"^3.18.0","fs-extra":"^2.1.2","babel-cli":"^6.24.0","coveralls":"^2.12.0","babel-preset-env":"^1.2.2","eslint-plugin-import":"^2.2.0","eslint-config-airbnb-base":"^11.1.1"},"_npmOperationalInternal":{"tmp":"tmp/current-git-branch-1.0.0.tgz_1491660355417_0.04902791720815003","host":"packages-18-east.internal.npmjs.com"}},"1.0.1":{"name":"current-git-branch","version":"1.0.1","keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","_id":"current-git-branch@1.0.1","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"ava":{"babel":"inherit","require":"babel-register"},"nyc":{"exclude":["build.js","test.js"]},"dist":{"shasum":"0f0acc596cacaf8cab37ae6637cc963dfbc27e43","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-1.0.1.tgz","integrity":"sha512-XhTMoY91wFBRLbaUF7UTAcDKj4ymp3WMoZDQ7vQqjGhzC6nl7us7PQyb11bnr2cHcAfn0yDzFjpmNKJW5YDacw==","signatures":[{"sig":"MEUCIQDoY7hn/c2ztmQb4/Y1/d85Wcoss77J+e5lFtcwZOnkvwIgcTr94aClI9J/5VBo0SnHoSSeUlXhWnII+vAilZIdnrc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build.js","gitHead":"5a2b4ea666a8a133cf5904ce438b8c57b74db525","scripts":{"lint":"eslint index.js test.js","test":"nyc ava","babel":"babel index.js -o build.js","prepush":"npm test","pretest":"npm run lint","coveralls":"nyc report --reporter=text-lcov | coveralls","prepublish":"npm run babel"},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"repository":{"url":"git+https://github.com/JPeer264/node-current-git-branch.git","type":"git"},"_npmVersion":"5.5.1","description":"A tool to check if files are added in a git repository","directories":{},"_nodeVersion":"8.9.1","dependencies":{"execa":"^0.6.1","is-git-repository":"^1.0.0","babel-plugin-add-module-exports":"^0.2.1"},"devDependencies":{"ava":"^0.18.2","nyc":"^10.1.2","husky":"^0.13.2","eslint":"^3.18.0","fs-extra":"^2.1.2","babel-cli":"^6.24.0","coveralls":"^2.12.0","babel-preset-env":"^1.2.2","eslint-plugin-import":"^2.2.0","eslint-config-airbnb-base":"^11.1.1"},"_npmOperationalInternal":{"tmp":"tmp/current-git-branch-1.0.1.tgz_1513628653304_0.6405425181146711","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"current-git-branch","version":"1.1.0","keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","_id":"current-git-branch@1.1.0","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"ava":{"babel":"inherit","require":"babel-register"},"nyc":{"exclude":["build.js","test.js"]},"dist":{"shasum":"3730e71ee024ed27dab16d740e5b1ea4774fa49f","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-1.1.0.tgz","fileCount":55,"integrity":"sha512-n5mwGZllLsFzxDPtTmadqGe4IIBPfqPbiIRX4xgFR9VK/Bx47U+94KiVkxSKAKN6/s43TlkztS2GZpgMKzwQ8A==","signatures":[{"sig":"MEUCIAi0v5z7boTVBQyeXAtGcN70FleS9qB1FDRnZJnNJkh0AiEA19PsK4h5NFfOv6l3K8BjlGO4BxyplkIthja0zHVT4OE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":206411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxdwTCRA9TVsSAnZWagAAr5YP/iZd6Sd/sS1oTJjvfrEh\nG2wsvrranqLpHB9RtE/YsraWepOfBn3bgPnSmhuW8E8gWZkopeWOoBnYOHAJ\nJbbnONWCibaOV/NhRM095K1pfPO5LT0+Ago1p3uu+XlTavBdYQLxsp/tENak\n2fxw7ztEtv0w+TVFJmSlKebZO3+G9xvKRTBR/aXbjKX1wN9BUPydYptMlu5R\nw8p1OgIJV5mPtEyycMKmwLNKebjaNmLKaYCXNjVA3t7Hs0/NbYbSV+K0jlnb\nYF/CC6SQ7zOHdqsajGI5S8tKJtYdrT9iDI4CI4waPVLyc39nX1K9nHXxdcpY\nAKi9l/KuFHGeuxmF2JQd3FMP6StgyzdydWkFjIwgKoNhF6Ou9va7vjMaYH/p\n4XIKrOLzAxPDEgGqDTrLjJm/S72IFwoAi+1D6nFdoqLDwJzRKbCJ6OEbhNYm\nHPeyWcMDAbwiYXoaS+0C4j6u61oHMPe1ufwIB8TMfrvQ9JuAo9QvzdBt8W+V\nfxo45YYhbf5ng9cAHUrJtQQ6UD98gtDCuufMXManCklh1AyowcmghQqidC4Y\nrAOeiBYuhaWGUEfxo2NlIGcpr5YXhkL4IRVokyRaBvpF8OBh9EPQ/PL+sOsS\nrtt4EgkSXGEN3lYRvObB7xwMDUJOrh1O8kTZtuQcwe5toTjR1Qct1c1e3CkW\nSHRx\r\n=Lk7s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build.js","gitHead":"d6914733978f4ccb0490e5601093b1f154aa37c5","scripts":{"lint":"eslint index.js test.js","test":"nyc ava","babel":"babel index.js -o build.js","prepush":"npm test","pretest":"npm run lint","coveralls":"nyc report --reporter=text-lcov | coveralls","prepublish":"npm run babel"},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"repository":{"url":"git+https://github.com/JPeer264/node-current-git-branch.git","type":"git"},"_npmVersion":"5.6.0","description":"A tool to check if files are added in a git repository","directories":{},"_nodeVersion":"8.9.4","dependencies":{"execa":"^0.6.1","is-git-repository":"^1.0.0","babel-plugin-add-module-exports":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^0.18.2","nyc":"^10.1.2","husky":"^0.13.2","eslint":"^3.18.0","fs-extra":"^2.1.2","babel-cli":"^6.24.0","coveralls":"^2.12.0","babel-preset-env":"^1.2.2","eslint-plugin-import":"^2.2.0","eslint-config-airbnb-base":"^11.1.1"},"_npmOperationalInternal":{"tmp":"tmp/current-git-branch_1.1.0_1539693587130_0.7900123943055917","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"current-git-branch","version":"2.0.0","keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","_id":"current-git-branch@2.0.0","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"dist":{"shasum":"f853653b42b591b2498e0a56367e0387cc981593","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-2.0.0.tgz","fileCount":55,"integrity":"sha512-khQ7bx95qNwM0n8CIJ6KEJUXaTVLaZkv/6Ej5DXh1mv3mZehpk9SXuZBScvc9E/5Svl5w2K6xGfsxH129Xzkjg==","signatures":[{"sig":"MEUCIQCCKkOgE+Rkkp0qTTkF/GorE9Vq04/LxyirDrU9wOyQtgIga0QKzz+dl1JaWukXvC+4ByHDv1Z8XAfqF/VnkDT+Y4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41736},"type":"module","types":"./index.d.ts","exports":{"types":"./index.d.ts","default":"./index.js"},"gitHead":"2504f83fb8a5891ab836b7f98f92642ae58d9ea8","scripts":{"lint":"eslint index.js index.spec.js","test":"vitest run . --coverage --coverage.reporter lcov","coveralls":"cat ./coverage/lcov.info | coveralls","prettier:check":"prettier --check .","prettier:format":"prettier --write ."},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"repository":{"url":"git+https://github.com/JPeer264/node-current-git-branch.git","type":"git"},"_npmVersion":"10.8.2","description":"A tool to check if files are added in a git repository","directories":{},"_nodeVersion":"18.20.5","dependencies":{"is-git-repository":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","vitest":"^2.1.8","prettier":"^3.4.2","coveralls":"^3.1.1","@eslint/js":"^9.18.0","@vitest/coverage-v8":"^2.1.8","eslint-config-prettier":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/current-git-branch_2.0.0_1736889797260_0.6673867953376327","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"current-git-branch","version":"2.0.1","keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","_id":"current-git-branch@2.0.1","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"dist":{"shasum":"07fa708865536cfccd7e71912030a331feae361c","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-2.0.1.tgz","fileCount":88,"integrity":"sha512-m24daDpf+LNAjeU3aZLQGe0lIE25iouTTBfJPYlhw14ZTkJBd+1BriWo/3gYYoYrqY1T2G6r/RFKXoYwks7peg==","signatures":[{"sig":"MEUCIHXwi0KgSUxua5S8NYT4HZX1qJRjJk1EVejWTp3L3UuuAiEA8M3mQC5QV+/J/aSLQcYPEwZBZgIvGReYDE0rPnUtCoI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69303},"type":"module","types":"./index.d.ts","exports":{"types":"./index.d.ts","default":"./index.js"},"gitHead":"957fbdf3baf03e6594690750a5d8946b01baad54","scripts":{"lint":"eslint index.js index.spec.js","test":"vitest run . --coverage --coverage.reporter lcov","coveralls":"cat ./coverage/lcov.info | coveralls","prettier:check":"prettier --check .","prettier:format":"prettier --write ."},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"repository":{"url":"git+https://github.com/JPeer264/node-current-git-branch.git","type":"git"},"_npmVersion":"10.7.0","description":"A tool to check if files are added in a git repository","directories":{},"_nodeVersion":"20.15.1","dependencies":{"is-git-repository":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","vitest":"^2.1.8","prettier":"^3.4.2","coveralls":"^3.1.1","@eslint/js":"^9.18.0","@vitest/coverage-v8":"^2.1.8","eslint-config-prettier":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/current-git-branch_2.0.1_1736948883912_0.9014961986379544","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"current-git-branch","version":"2.0.2","description":"A tool to check if files are added in a git repository","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"scripts":{"test":"vitest run . --coverage --coverage.reporter lcov","lint":"eslint index.js index.spec.js","prettier:check":"prettier --check .","prettier:format":"prettier --write .","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/JPeer264/node-current-git-branch.git"},"keywords":["is","git","added","HEAD","repo","is-git","exists"],"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"homepage":"https://github.com/JPeer264/node-current-git-branch#readme","dependencies":{"is-git-repository":"^3.0.0"},"devDependencies":{"@eslint/js":"^9.18.0","@vitest/coverage-v8":"^2.1.8","coveralls":"^3.1.1","eslint":"^9.18.0","eslint-config-prettier":"^10.0.1","prettier":"^3.4.2","vitest":"^2.1.8"},"_id":"current-git-branch@2.0.2","gitHead":"1c333d05da50650fc072db4da77bf8d553e4d12c","types":"./index.d.ts","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-uf6Yvp3WGEGlJbsoseXIun9pvfUyts3nbHm6bn6/JBHiBgDbVifd/0dsJXLCo6ndRJGBlLxXhK+YNPBVouFdyA==","shasum":"b9a18a503151ddaa3e56ffb3cf75602d05f044ef","tarball":"https://registry.npmjs.org/current-git-branch/-/current-git-branch-2.0.2.tgz","fileCount":88,"unpackedSize":69393,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJGXwlXWfXpHs1f563YHCuuizFmfs4HJFOUK+NOAg5iwIhAK8ftYBfEpglPOHLd+jOK6+EWwGV/ssqxPiQPvNH/c/D"}]},"_npmUser":{"name":"jpeer","email":"janpeer264@gmail.com"},"directories":{},"maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/current-git-branch_2.0.2_1758365033069_0.8621966385297253"},"_hasShrinkwrap":false}},"time":{"created":"2017-04-08T14:05:56.090Z","modified":"2025-09-20T10:43:53.444Z","1.0.0":"2017-04-08T14:05:56.090Z","1.0.1":"2017-12-18T20:24:14.399Z","1.1.0":"2018-10-16T12:39:47.282Z","2.0.0":"2025-01-14T21:23:17.474Z","2.0.1":"2025-01-15T13:48:04.130Z","2.0.2":"2025-09-20T10:43:53.260Z"},"bugs":{"url":"https://github.com/JPeer264/node-current-git-branch/issues"},"author":{"name":"Jan Peer Stöcklmair"},"license":"MIT","homepage":"https://github.com/JPeer264/node-current-git-branch#readme","keywords":["is","git","added","HEAD","repo","is-git","exists"],"repository":{"type":"git","url":"git+https://github.com/JPeer264/node-current-git-branch.git"},"description":"A tool to check if files are added in a git repository","maintainers":[{"name":"jpeer","email":"janpeer264@gmail.com"}],"readme":"# current-git-branch\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/JPeer264/node-current-git-branch/ci.yml?branch=main)](https://github.com/JPeer264/node-current-git-branch/actions/workflows/ci.yml?query=branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-current-git-branch/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/node-current-git-branch?branch=master)\n\nGet synchronously the current branch name\n\n## Installation\n\n```sh\n$ npm i current-git-branch --save\n```\n\n## Usage\n\nReturns:\n\n- Boolean `false`: It is not a git repository\n- String: The branch name\n\n```js\nimport branchName from \"current-git-branch\";\n\nbranchName(); // false or branch name of process.cwd()\nbranchName({ cwd: \"any/git/repo\" }); // false or branch name of the directory 'any/git/repo'\nbranchName({ cwd: \"any/git/repo\", branchOptions: [\"--no-color\"] }); // alternatively, you may pass git-branch command options, either as a string or an array\n```\n\n## LICENSE\n\nMIT © [Jan Peer Stöcklmair](https://www.jpeer.at)\n","readmeFilename":"README.md"}