【文件属性】:
文件名称:default-branch:获取GitHub存储库的默认分支
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-30 11:35:05
github nodejs github-enterprise repository branch
默认分支
获取GitHub存储库的默认分支
安装
$ npm install default-branch
用法
const defaultBranch = require ( 'default-branch' ) ;
defaultBranch ( 'Knutakir/emorjis' ) . then ( branch => {
console . log ( branch ) ;
// => main
} ) ;
defaultBranch ( 'https://github.com/Knutakir/btc-value-cli' ) . then ( branch => {
console . log ( branch ) ;
// => main
} ) ;
defaultBranch ( 'https://enterprise.github.c
【文件预览】:
default-branch-main
----.travis.yml(54B)
----index.js(1KB)
----test.js(1KB)
----package.json(859B)
----index.test-d.ts(304B)
----.eslintrc.json(938B)
----LICENSE(1KB)
----index.d.ts(637B)
----.gitignore(884B)
----.npmrc(19B)
----README.md(1KB)