Skip to content

Commit 9fb86cf

Browse files
niftylettucelpinca
authored andcommitted
[doc] Replace URL with Url (#158)
1 parent 4e14338 commit 9fb86cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ All examples assume that this library is bootstrapped using:
3838
```js
3939
'use strict';
4040

41-
var URL = require('url-parse');
41+
var Url = require('url-parse');
4242
```
4343

4444
To parse an URL simply call the `URL` method with the URL that needs to be
4545
transformed into an object.
4646

4747
```js
48-
var url = new URL('https://github.com/foo/bar');
48+
var url = new Url('https://github.com/foo/bar');
4949
```
5050

5151
The `new` keyword is optional but it will save you an extra function invocation.
@@ -100,7 +100,7 @@ var parse = require('url-parse');
100100
parse('hostname', {});
101101
```
102102

103-
### URL.set(key, value)
103+
### Url.set(key, value)
104104

105105
A simple helper function to change parts of the URL and propagating it through
106106
all properties. When you set a new `host` you want the same value to be applied
@@ -117,7 +117,7 @@ console.log(parsed.href); // http://yahoo.com/parse-things
117117
It's aware of default ports so you cannot set a port 80 on an URL which has
118118
`http` as protocol.
119119

120-
### URL.toString()
120+
### Url.toString()
121121

122122
The returned `url` object comes with a custom `toString` method which will
123123
generate a full URL again when called. The method accepts an extra function

0 commit comments

Comments
 (0)