Skip to content

herrmannplatz/gitlab-url-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitlab-url-parse

npm version Build Status

Parse Gitlab urls

Install

$ npm install gitlab-url-parse

Usage

const parse = require('gitlab-url-parse')

console.log(parse('https://gitlab.com/herrmannplatz'))
// { user: 'herrmannplatz' }

console.log(parse('https://gitlab.com/herrmannplatz/gitlab-url-parse'))
// { user: 'herrmannplatz', project: 'gitlab-url-parse' }

console.log(parse('https://gitlab.com/herrmannplatz/gitlab-url-parse/merge_requests/1'))
// { user: 'herrmannplatz', project: 'gitlab-url-parse', mr: 1 }