File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,22 @@ Fun experiment to normalize URLs w/ functional programming
4
4
## Usage
5
5
6
6
``` js
7
- const normalize = require (' functional -normalize-url ' );
7
+ const normalize = require (' composable -normalize' );
8
8
9
9
normalize (' http://hello.com//there/../buddy/..' );
10
- // => "http://hello.com/there/buddy/"
10
+ // => 'http://hello.com/there/buddy/'
11
+
12
+ normalize (' HTTP://www.Github.com/' );
13
+ // => 'http://www.github.com/'
14
+
15
+ normalize (' http://www.github.com/../a/b/../c/./d' );
16
+ // => 'http://www.github.com/a/c/d'
17
+
18
+ normalize (' http://www.github.com:80/bar' );
19
+ // => 'http://www.github.com/bar'
20
+
21
+ normalize (' http://www.github.com/%7Eusername/' );
22
+ // => 'http://www.github.com/~username'
11
23
```
12
24
13
25
## Current Features
You can’t perform that action at this time.
0 commit comments