Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Apr 26, 2016
1 parent a42887e commit ec2adee
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Contributions are more than welcome!

Thanks! :sweat_smile:



[1]: https://github.com/IonicaBizau/git-up/issues

[2]: https://github.com/IonicaBizau/code-style
[2]: https://github.com/IonicaBizau/code-style
23 changes: 23 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Documentation

You can see below the API reference of this module.

### `gitUp(input)`
Parses the input url.

#### Params
- **String** `input`: The input url.

#### Return
- **Object** An object containing the following fields:
- `protocols` (Array): An array with the url protocols (usually it has one element).
- `port` (null|Number): The domain port.
- `resource` (String): The url domain (including subdomains).
- `user` (String): The authentication user (usually for ssh urls).
- `pathname` (String): The url pathname.
- `hash` (String): The url hash.
- `search` (String): The url querystring value.
- `href` (String): The input url.
- `protocol` (String): The git url protocol.
- `token` (String): The oauth token (could appear in the https urls).

24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

# git-up [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/git-up.svg)](https://www.npmjs.com/package/git-up) [![Downloads](https://img.shields.io/npm/dt/git-up.svg)](https://www.npmjs.com/package/git-up) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)

> A low level git url parser.
## Installation
## :cloud: Installation

```sh
$ npm i --save git-up
```

## Example

## :clipboard: Example



```js
// Dependencies
Expand Down Expand Up @@ -41,7 +45,8 @@ console.log(gitUp("https://github.com/IonicaBizau/node-parse-url.git"));
// }
```

## Documentation
## :memo: Documentation


### `gitUp(input)`
Parses the input url.
Expand All @@ -62,15 +67,18 @@ Parses the input url.
- `protocol` (String): The git url protocol.
- `token` (String): The oauth token (could appear in the https urls).

## How to contribute


## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].

## Where is this library used?
## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:

- [`git-url-parse`](https://github.com/IonicaBizau/git-url-parse)

## License
- [`git-url-parse`](https://github.com/IonicaBizau/git-url-parse)—A high level git url parser for common git providers.

## :scroll: License

[MIT][license] © [Ionică Bizău][website]

Expand All @@ -80,4 +88,4 @@ If you are using this library in one of your projects, add it in this list. :spa
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2015#license-mit
[website]: http://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
[docs]: /DOCUMENTATION.md

0 comments on commit ec2adee

Please sign in to comment.