Add more lib docs
This commit is contained in:
+11
-13
@@ -2,19 +2,7 @@
|
||||
|
||||
A `normalizeUrl` function borrowed from [sindresorhus/normalize-url](https://github.com/sindresorhus/normalize-url) is included for convenience.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```typescript
|
||||
normalizeUrl('example')
|
||||
//=> 'http://example'
|
||||
|
||||
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
|
||||
//=> 'http://sindresorhus.com/about.html'
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
### Configuration
|
||||
## API
|
||||
|
||||
```typescript
|
||||
export type Options = {
|
||||
@@ -67,3 +55,13 @@ export type Options = {
|
||||
readonly sortQueryParameters?: boolean
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
normalizeUrl('example')
|
||||
//=> 'http://example'
|
||||
|
||||
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
|
||||
//=> 'http://sindresorhus.com/about.html'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user