{"id":17472584,"url":"https://github.com/shinnn/parse-user-branch","last_synced_at":"2026-07-06T14:30:58.117Z","repository":{"id":58225062,"uuid":"50094981","full_name":"shinnn/parse-user-branch","owner":"shinnn","description":"Parse a username:branch string that is available for Github commit comparison API","archived":false,"fork":false,"pushed_at":"2018-12-23T23:38:16.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T14:34:24.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-21T08:59:00.000Z","updated_at":"2018-12-23T23:38:17.000Z","dependencies_parsed_at":"2022-08-31T04:10:49.097Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/parse-user-branch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/parse-user-branch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fparse-user-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fparse-user-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fparse-user-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fparse-user-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/parse-user-branch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fparse-user-branch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35195590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T17:28:10.791Z","updated_at":"2026-07-06T14:30:58.008Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-user-branch\n\n[![npm version](https://img.shields.io/npm/v/parse-user-branch.svg)](https://www.npmjs.com/package/parse-user-branch)\n[![Build Status](https://travis-ci.com/shinnn/parse-user-branch.svg?branch=master)](https://travis-ci.com/shinnn/parse-user-branch)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/parse-user-branch.svg)](https://coveralls.io/github/shinnn/parse-user-branch?branch=master)\n\nParse a `username:branch` string that is available for [Github](https://github.com/) [commit comparison API](https://developer.github.com/v3/repos/commits/#compare-two-commits)\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install parse-user-branch\n```\n\n## API\n\n```javascript\nimport parseUserBranch from 'parse-user-branch';\n```\n\n### parseUserBranch(*str*)\n\n*str*: `string` (`username:branch` style branch expression, for example \u003chttps://github.com/isaacs/nyc/tree/dep-update\u003e → `'isaacs:dep-update'`)  \nReturn: `Object` (`{username: ..., branch: ...}`)\n\nIt extracts a username and a branch name from a `username:branch` string and creates an object.\n\n```javascript\nparseUserBranch('shinnn:patch-1');\n//=\u003e {username: 'shinnn', branch: 'patch-1'}\n```\n\n## License\n\nCopyright (c) 2016 - 2018 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fparse-user-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fparse-user-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fparse-user-branch/lists"}