@@ -221,7 +221,6 @@ isEqual("foo/", "foo"); // true
221
221
isEqual (" /foo bar" , " /foo%20bar" ); // true
222
222
223
223
// Strict compare
224
-
225
224
isEqual (" /foo" , " foo" , { leadingSlash: true }); // false
226
225
isEqual (" foo/" , " foo" , { trailingSlash: true }); // false
227
226
isEqual (" /foo bar" , " /foo%20bar" , { encoding: true }); // false
@@ -274,8 +273,11 @@ Normlizes inputed url:
274
273
** Example:**
275
274
276
275
``` js
277
- normalizeURL (" test?query=123 123#hash, test" ); // "test?query=123%20123#hash,%20test"
278
- normalizeURL (" http://localhost:3000" ); // "http://localhost:3000"
276
+ normalizeURL (" test?query=123 123#hash, test" );
277
+ // Returns "test?query=123%20123#hash,%20test"
278
+
279
+ normalizeURL (" http://localhost:3000" );
280
+ // Returns "http://localhost:3000"
279
281
```
280
282
281
283
### ` resolveURL(base) `
@@ -344,7 +346,8 @@ Removes the fragment section from the URL.
344
346
** Example:**
345
347
346
348
``` js
347
- withoutFragment (" http://example.com/foo?q=123#bar" ); // "http://example.com/foo?q=123"
349
+ withoutFragment (" http://example.com/foo?q=123#bar" )
350
+ // Returns "http://example.com/foo?q=123"
348
351
```
349
352
350
353
### ` withoutLeadingSlash(input) `
@@ -362,8 +365,7 @@ If second argument is is true, it will only remove the trailing slash if it's no
362
365
``` js
363
366
withoutTrailingSlash (" /foo/" ); // "/foo"
364
367
365
- withoutTrailingSlash (" /path/?query=true" , true );
366
- (" /path?query=true" );
368
+ withoutTrailingSlash (" /path/?query=true" , true ); // "/path?query=true"
367
369
```
368
370
369
371
### ` withProtocol(input, protocol) `
@@ -397,12 +399,12 @@ If seccond argument is `true`, it will only add the trailing slash if it's not p
397
399
``` js
398
400
withTrailingSlash (" /foo" ); // "/foo/"
399
401
400
- withTrailingSlash (" /path?query=true" , true );
401
- (" /path/?query=true" );
402
+ withTrailingSlash (" /path?query=true" , true ); // "/path/?query=true"
402
403
```
403
404
404
405
### ` hasProtocol(inputString, opts) `
405
406
407
+
406
408
### ` withoutProtocol(input) `
407
409
408
410
Removes the protocol from the input.
@@ -413,6 +415,7 @@ Removes the protocol from the input.
413
415
withoutProtocol (" http://example.com" ); // "example.com"
414
416
```
415
417
418
+
416
419
<!-- AUTOMD_END -->
417
420
418
421
## License
0 commit comments