Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngot/fibjs-github-url-from-git
github-url-from-git for fibjs
https://github.com/ngot/fibjs-github-url-from-git
Last synced: about 2 months ago
JSON representation
github-url-from-git for fibjs
- Host: GitHub
- URL: https://github.com/ngot/fibjs-github-url-from-git
- Owner: ngot
- License: mit
- Created: 2014-07-13T06:04:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-13T06:04:32.000Z (over 10 years ago)
- Last Synced: 2024-10-16T21:26:37.200Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# github-url-from-git
```js
describe('parse(url)', function(){
it('should support git://*', function(){
var url = 'git://github.com/jamesor/mongoose-versioner';
assert.equal(parse(url), 'https://github.com/jamesor/mongoose-versioner');
})it('should support git://*.git', function(){
var url = 'git://github.com/treygriffith/cellar.git';
assert.equal(parse(url), 'https://github.com/treygriffith/cellar');
})it('should support https://*', function(){
var url = 'https://github.com/Empeeric/i18n-node';
assert.equal(parse(url), 'https://github.com/Empeeric/i18n-node');
})it('should support https://*.git', function(){
var url = 'https://[email protected]/banchee/tranquil.git';
assert.equal(parse(url), 'https://github.com/banchee/tranquil');
})it('should return undefined on failure', function(){
var url = 'git://github.com/justgord/.git';
assert.equal(null, parse(url));
})it('should parse git@gist urls', function() {
var url = '[email protected]:3135914.git';
assert.equal(parse(url), 'https://gist.github.com/3135914')
})it('should parse https://gist urls', function() {
var url = 'https://gist.github.com/3135914.git';
assert.equal(parse(url), 'https://gist.github.com/3135914')
})
})
```