@gh-conf/gh-conf-parse

1.1.0 • Public • Published

gh-conf-parse

Build Github Repo Size LICENSE NPM Downloads NPM Version Contributors Commit

Parser for parsing information from github config file

Install

npm install @gh-conf/gh-conf-parse

Usage

const { ParseConfig, UserRepo } = require('@gh-conf/gh-conf-parse');

const CurrConfig = ParseConfig();

// Output
// {
//    core:{
//       repositoryformatversion:'0',
//       filemode:'true',
//       bare:'false',
//       logallrefupdates:'true',
//       ignorecase:'true',
//       precomposeunicode:'true'
//    },
//    'remote "origin"':{
//       url:'https://github.com/gh-conf/gh-conf-parse.git',
//       fetch:'+refs/heads/*:refs/remotes/origin/*'
//    },
//    'branch "master"':{
//       remote:'origin',
//       merge:'refs/heads/master'
//    }
// }


const userRepo = UserRepo();

// Output
// {
//   repository:'gh-conf-parse',
//   username:'gh-conf'
// }

API

ParseConfig

  • Returns complete git config as JSON

UserRepo

  • Returns repo owner name and repository name

Contributing

Interested in contributing to this project? You can log any issues or suggestion related to this library here.

Read our contributing guide to get started with contributing to the codebase.

Contributors

Thank you to all the contributors who have helped us in making this project better 🙌

Package Sidebar

Install

npm i @gh-conf/gh-conf-parse

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

5.88 kB

Total Files

6

Last publish

Collaborators

  • arshadkazmi42
  • bluitel