<commit_before># Url Skeleton
Parse a string of url in a object with some properties: protocol, domain, subdomain, domainname, port, path, query, parameters and fragment.


## How install
For only install url-skeleton
```
npm i url-skeleton
```

Or for install and add this dependence in the package.json of your project.
```
npm i --save url-skeleton
```


## Methods
This project has 10 methods:

- getUrlSkeleton: return a complete skeleton of the url
- getProtocol: return only the protocol of the url
- getDomain: return only the domain of the url
- getSubDomain: return only the subdomain of the url
- getDomainName: return only the domain name of the url
- getPort: return only the port of the url
- getPath: return only the path of the url
- getQuery: return only the query of the url
- getParameters: return a array of the query parameters of the url
- getFragment: return only the fragment of the url


## Example
The use of url skeleton is very easy.

```
// require the module
var UrlSkeleton = require("url-skeleton");

// use the module
UrlSkeleton.getUrlSkeleton("https://example.url-skeleton.com:80/example-url-skeleton/?type=example&test=true#testing");
/*
 * Returns
 * {
 *   protocol: "https",
 *   domain: "example.url-skeleton.com",
 *   subdomain: "example",
 *   domainname: "url-skeleton",
 *   port: "80",
 *   path: "/example-url-skeleton/",
 *   query: "type=example&test=true",
 *   parameters: [{type: "example"}, {test: "true"}],
 *   fragment: "testing"
 * }
 */
```


## Testing
For execute the tests of this module
```
npm test
```


## Contribute
For contribute with this project, create a fork in github <https://github.com/luizdesign/url-skeleton>


## Changelog
**Version 0.1.3: 2015/08/06**
* Bug Fix: Accepting encoded url like a valid url

**Version 0.1.2: 2015/08/05**
* Bug Fix: Accepting query with array parameter (?test[0]=1) like a valid url. 
* Bug Fix: .getQuery() recognizing query with array parameter (?test[0]=1).

**Version 0.1.1: 2015/08/05**
* Bug Fix: Accepting "/" like a valid url

**Version 0.1.0: 2015/08/05**
* First Release
<commit_msg>Updating the tests instructions and changelog<commit_after># Url Skeleton
Parse a string of url in a object with some properties: protocol, domain, subdomain, domainname, port, path, query, parameters and fragment.


## How install
For only install url-skeleton
```
npm i url-skeleton
```

Or for install and add this dependence in the package.json of your project.
```
npm i --save url-skeleton
```


## Methods
This project has 10 methods:

- getUrlSkeleton: return a complete skeleton of the url
- getProtocol: return only the protocol of the url
- getDomain: return only the domain of the url
- getSubDomain: return only the subdomain of the url
- getDomainName: return only the domain name of the url
- getPort: return only the port of the url
- getPath: return only the path of the url
- getQuery: return only the query of the url
- getParameters: return a array of the query parameters of the url
- getFragment: return only the fragment of the url


## Example
The use of url skeleton is very easy.

```
// require the module
var UrlSkeleton = require("url-skeleton");

// use the module
UrlSkeleton.getUrlSkeleton("https://example.url-skeleton.com:80/example-url-skeleton/?type=example&test=true#testing");
/*
 * Returns
 * {
 *   protocol: "https",
 *   domain: "example.url-skeleton.com",
 *   subdomain: "example",
 *   domainname: "url-skeleton",
 *   port: "80",
 *   path: "/example-url-skeleton/",
 *   query: "type=example&test=true",
 *   parameters: [{type: "example"}, {test: "true"}],
 *   fragment: "testing"
 * }
 */
```


## Testing
For execute the all tests of this module
```
npm test
```

For execute the tests by a specific module
```
npm test -- --mod=skeleton // Will execute only the testSkeleton.js tests
npm test -- --mod=port // Will execute only the testPort.js tests
```


## Contribute
For contribute with this project, create a fork in github <https://github.com/luizdesign/url-skeleton>


## Changelog
**Version 0.1.4: 2015/08/11**
* Unit test improvement: Run unit test for a specific module

**Version 0.1.3: 2015/08/06**
* Bug Fix: Accepting encoded url like a valid url

**Version 0.1.2: 2015/08/05**
* Bug Fix: Accepting query with array parameter (?test[0]=1) like a valid url. 
* Bug Fix: .getQuery() recognizing query with array parameter (?test[0]=1).

**Version 0.1.1: 2015/08/05**
* Bug Fix: Accepting "/" like a valid url

**Version 0.1.0: 2015/08/05**
* First Release

{'fraction_non_alphanumeric': 0.12284196547144755, 'fraction_numerical': 0.02633908809207614, 'mean_word_length': 3.895991332611051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2907916', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1378, 'n_words': 555}